From 58afcec6415e89b433e06d37d4d9b4e652c1a999 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Sat, 18 Nov 2023 22:14:08 +0100 Subject: [PATCH] chore(YouTube): Only debug log if `protobufBuffer` has no array --- .../patches/components/LithoFilterPatch.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/app/revanced/integrations/patches/components/LithoFilterPatch.java b/app/src/main/java/app/revanced/integrations/patches/components/LithoFilterPatch.java index 8176a285..8712a551 100644 --- a/app/src/main/java/app/revanced/integrations/patches/components/LithoFilterPatch.java +++ b/app/src/main/java/app/revanced/integrations/patches/components/LithoFilterPatch.java @@ -489,8 +489,13 @@ public final class LithoFilterPatch { return false; ByteBuffer protobufBuffer = bufferThreadLocal.get(); - if (protobufBuffer == null || !protobufBuffer.hasArray()) { - LogHelper.printException(() -> "Proto buffer is null or has no array"); // Should never happen. + if (protobufBuffer == null) { + LogHelper.printException(() -> "Proto buffer is null"); // Should never happen. + return false; + } + + if (!protobufBuffer.hasArray()) { + LogHelper.printDebug(() -> "Proto buffer does not have an array"); return false; }