src/SDL_hints.c
changeset 7719 31b5f9ff36ca
parent 7716 be4cda94bce2
child 8093 b43765095a6f
     1.1 --- a/src/SDL_hints.c	Thu Aug 29 08:27:25 2013 -0700
     1.2 +++ b/src/SDL_hints.c	Thu Aug 29 08:29:21 2013 -0700
     1.3 @@ -72,9 +72,7 @@
     1.4                      entry->callback(entry->userdata, name, hint->value, value);
     1.5                      entry = next;
     1.6                  }
     1.7 -                if (hint->value) {
     1.8 -                    SDL_free(hint->value);
     1.9 -                }
    1.10 +                SDL_free(hint->value);
    1.11                  hint->value = value ? SDL_strdup(value) : NULL;
    1.12              }
    1.13              hint->priority = priority;
    1.14 @@ -206,9 +204,7 @@
    1.15          SDL_hints = hint->next;
    1.16  
    1.17          SDL_free(hint->name);
    1.18 -        if (hint->value) {
    1.19 -            SDL_free(hint->value);
    1.20 -        }
    1.21 +        SDL_free(hint->value);
    1.22          for (entry = hint->callbacks; entry; ) {
    1.23              SDL_HintWatch *freeable = entry;
    1.24              entry = entry->next;