src/SDL_hints.c
changeset 9201 21d9f9babb30
parent 8149 681eb46b8ac4
child 9202 01bb8e3ba14f
equal deleted inserted replaced
9200:bfdc18891a60 9201:21d9f9babb30
   147     }
   147     }
   148     if (!hint) {
   148     if (!hint) {
   149         /* Need to add a hint entry for this watcher */
   149         /* Need to add a hint entry for this watcher */
   150         hint = (SDL_Hint *)SDL_malloc(sizeof(*hint));
   150         hint = (SDL_Hint *)SDL_malloc(sizeof(*hint));
   151         if (!hint) {
   151         if (!hint) {
       
   152             if(entry)
       
   153             {
       
   154               SDL_free(entry);
       
   155               entry = NULL;
       
   156             }
   152             return;
   157             return;
   153         }
   158         }
   154         hint->name = SDL_strdup(name);
   159         hint->name = SDL_strdup(name);
   155         hint->value = NULL;
   160         hint->value = NULL;
   156         hint->priority = SDL_HINT_DEFAULT;
   161         hint->priority = SDL_HINT_DEFAULT;