소스 검색

Removed unnecessary NULL check.

Philipp Wiesemann 11 년 전
부모
커밋
0c60f023f5
1개의 변경된 파일1개의 추가작업 그리고 5개의 파일을 삭제
  1. 1 5
      src/SDL_hints.c

+ 1 - 5
src/SDL_hints.c

@@ -154,11 +154,7 @@ SDL_AddHintCallback(const char *name, SDL_HintCallback callback, void *userdata)
         hint = (SDL_Hint *)SDL_malloc(sizeof(*hint));
         if (!hint) {
             SDL_OutOfMemory();
-            if(entry)
-            {
-              SDL_free(entry);
-              entry = NULL;
-            }
+            SDL_free(entry);
             return;
         }
         hint->name = SDL_strdup(name);