Commit 0c60f023f549d718f552d1fa3535425943ce97a2

Philipp Wiesemann 2014-10-29T22:41:01

Removed unnecessary NULL check.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/src/SDL_hints.c b/src/SDL_hints.c
index 520e4ea..ec5ed5b 100644
--- a/src/SDL_hints.c
+++ b/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);