mirror of
https://github.com/revanced/revanced-integrations.git
synced 2025-01-05 17:45:49 +01:00
fix(YouTube): Check if protobufBuffer
can be filtered
An `UnsupportedOperationException` exception would be thrown in `LithoFilterParameters#LithoFilterParameters` if this buffer is not backed by an accessible array
This commit is contained in:
parent
46bfeea1a3
commit
b078f0ca37
@ -489,10 +489,11 @@ public final class LithoFilterPatch {
|
||||
return false;
|
||||
|
||||
ByteBuffer protobufBuffer = bufferThreadLocal.get();
|
||||
if (protobufBuffer == null) {
|
||||
LogHelper.printException(() -> "Proto buffer is null"); // Should never happen
|
||||
if (protobufBuffer == null || !protobufBuffer.hasArray()) {
|
||||
LogHelper.printException(() -> "Proto buffer is null or has no array"); // Should never happen.
|
||||
return false;
|
||||
}
|
||||
|
||||
LithoFilterParameters parameter = new LithoFilterParameters(lithoIdentifier, pathBuilder, protobufBuffer);
|
||||
LogHelper.printDebug(() -> "Searching " + parameter);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user