HumbleUI / Skija

Java bindings for Skia
Apache License 2.0
498 stars 34 forks source link

Surface::makeImageSnapshot crashes if _nMakeImageSnapshotR returns null #23

Closed Sm0keySa1m0n closed 2 years ago

Sm0keySa1m0n commented 2 years ago

Surface::makeImageSnapshot is correctly marked as @Nullable because _nMakeImageSnapshotR can return a null pointer. However, it doesn't check whether _nMakeImageSnapshotR returns null and instead always calls the Image constructor which will crash if the pointer is null.

tonsky commented 2 years ago

Thanks!