From 354848ec6f322a450ea611796242ebca4136a92e Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Wed, 6 Mar 2013 01:47:21 -0500 Subject: [PATCH] sdl12-compat: Corrected LoadSDL20Symbol(). --- src/SDL_12_compat.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/SDL_12_compat.c b/src/SDL_12_compat.c index 9855a8a93..adf47c359 100644 --- a/src/SDL_12_compat.c +++ b/src/SDL_12_compat.c @@ -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