Browse Source

Android: fix a crash in painting when size of the array to allocate is 0.

tags/2021-05-28
Lukasz Kozakiewicz 8 years ago
parent
commit
f4bfa6bec5
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      modules/juce_gui_basics/native/juce_android_Windowing.cpp

+ 4
- 0
modules/juce_gui_basics/native/juce_android_Windowing.cpp View File

@@ -526,6 +526,10 @@ public:
sizeAllocated = sizeNeeded;
buffer = GlobalRef (env->NewIntArray (sizeNeeded));
}
else if (sizeNeeded == 0)
{
return;
}
if (jint* dest = env->GetIntArrayElements ((jintArray) buffer.get(), 0))
{


Loading…
Cancel
Save