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:
Ozkan Sezer 2024-05-08 19:33:04 +03:00 committed by Ozkan Sezer
parent 7abc589438
commit e909c0360f
15 changed files with 21 additions and 57 deletions

View file

@ -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;