Skip to content

Commit

Permalink
sdl12-compat: Corrected LoadSDL20Symbol().
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Mar 6, 2013
1 parent e369ff7 commit 354848e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/SDL_12_compat.c
Expand Up @@ -254,9 +254,14 @@ static int SDL_VideoDisplayIndex = 0;
static void *
LoadSDL20Symbol(const char *fn, int *okay)
{
if (!*okay)
return NULL; /* Already failed, so don't bother trying. */
return LookupSDL20Sym(fn);
void *retval = NULL;
if (*okay) /* only bother trying if we haven't previously failed. */
{
retval = LookupSDL20Sym(fn);
if (retval == NULL)
*okay = 0;
}
return retval;
}

static void
Expand Down

0 comments on commit 354848e

Please sign in to comment.