Переглянути джерело

haiku: Don't strdup SDL_GetError()'s string before using it in SDL_SetError().

This isn't necessary anymore, after recent fixes.

(cherry picked from commit 8fb1c6e367620be931ef5b1477737e144c1c10c1)
Ryan C. Gordon 2 тижнів тому
батько
коміт
33f4093086
1 змінених файлів з 1 додано та 3 видалено
  1. 1 3
      src/dialog/haiku/SDL_haikudialog.cc

+ 1 - 3
src/dialog/haiku/SDL_haikudialog.cc

@@ -222,9 +222,7 @@ void SDL_SYS_ShowFileDialogWithProperties(SDL_FileDialogType type, SDL_DialogFil
     };
 
     if (!SDL_InitBeApp()) {
-        char *err = SDL_strdup(SDL_GetError());
-        SDL_SetError("Couldn't init Be app: %s", err);
-        SDL_free(err);
+        SDL_SetError("Couldn't init Be app: %s", SDL_GetError());
         callback(userdata, NULL, -1);
         return;
     }