mirror of
https://github.com/revanced/revanced-integrations.git
synced 2025-01-07 10:35: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;
|
return false;
|
||||||
|
|
||||||
ByteBuffer protobufBuffer = bufferThreadLocal.get();
|
ByteBuffer protobufBuffer = bufferThreadLocal.get();
|
||||||
if (protobufBuffer == null) {
|
if (protobufBuffer == null || !protobufBuffer.hasArray()) {
|
||||||
LogHelper.printException(() -> "Proto buffer is null"); // Should never happen
|
LogHelper.printException(() -> "Proto buffer is null or has no array"); // Should never happen.
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
LithoFilterParameters parameter = new LithoFilterParameters(lithoIdentifier, pathBuilder, protobufBuffer);
|
LithoFilterParameters parameter = new LithoFilterParameters(lithoIdentifier, pathBuilder, protobufBuffer);
|
||||||
LogHelper.printDebug(() -> "Searching " + parameter);
|
LogHelper.printDebug(() -> "Searching " + parameter);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user