mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-27 15:09:11 +00:00
remove most of SDL_OutOfMemory() calls where SDL is the allocator.
Since commit 447b508a77
, SDL_malloc,
SDL_calloc, and SDL_realloc already calls SDL_OutOfMemory().
This commit is contained in:
parent
7abc589438
commit
e909c0360f
15 changed files with 21 additions and 57 deletions
|
@ -2855,7 +2855,6 @@ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeFileDialog)(
|
|||
char **charFileList = SDL_calloc(sizeof(char*), count + 1);
|
||||
|
||||
if (charFileList == NULL) {
|
||||
SDL_OutOfMemory();
|
||||
mAndroidFileDialogData.callback(mAndroidFileDialogData.userdata, NULL, -1);
|
||||
mAndroidFileDialogData.callback = NULL;
|
||||
return;
|
||||
|
@ -2879,7 +2878,6 @@ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeFileDialog)(
|
|||
if (!newFile) {
|
||||
(*env)->ReleaseStringUTFChars(env, string, utf8string);
|
||||
(*env)->DeleteLocalRef(env, string);
|
||||
SDL_OutOfMemory();
|
||||
mAndroidFileDialogData.callback(mAndroidFileDialogData.userdata, NULL, -1);
|
||||
mAndroidFileDialogData.callback = NULL;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue