diff --git a/mediapipe/java/com/google/mediapipe/framework/GraphTextureFrame.java b/mediapipe/java/com/google/mediapipe/framework/GraphTextureFrame.java index 63ea7854b..6a2c97b94 100644 --- a/mediapipe/java/com/google/mediapipe/framework/GraphTextureFrame.java +++ b/mediapipe/java/com/google/mediapipe/framework/GraphTextureFrame.java @@ -158,7 +158,7 @@ public class GraphTextureFrame implements TextureFrame { @Override protected void finalize() throws Throwable { - if (refCount >= 0 || nativeBufferHandle != 0) { + if (refCount > 0 || nativeBufferHandle != 0) { logger.atWarning().log("release was not called before finalize"); } if (!activeConsumerContextHandleSet.isEmpty()) {