Skip to content

Commit

Permalink
Fix the crash of CallObjectMethod. (#959)
Browse files Browse the repository at this point in the history
Co-authored-by: kevingpqi <kevingpqi@tencent.com>
(cherry picked from commit 5cc6f6f)
  • Loading branch information
kevingpqi123 committed May 29, 2023
1 parent 84cf40b commit c0043c2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tgfx/src/platform/android/NativeCodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@ static jobject ConvertHardwareBitmap(JNIEnv* env, jobject bitmap) {
// The AndroidBitmapInfo does not contain the ANDROID_BITMAP_FLAGS_IS_HARDWARE flag in the old
// versions of Android NDK, even when the Java Bitmap has the hardware config. So we check it here
// by the Java-side methods.
if (bitmap == nullptr) {
return nullptr;
}
if (BitmapConfig_HARDWARE == nullptr) {
return bitmap;
}
Expand Down

0 comments on commit c0043c2

Please sign in to comment.