Fixed crash when dynamic X11 fails to load system Xlib libraries at runtime.

This commit is contained in:
Ryan C. Gordon
2005-11-17 02:35:15 +00:00
parent cde87da963
commit 58619a0496

View File

@@ -104,11 +104,10 @@ int SDL_X11_LoadSymbols(void)
#ifdef X11_DYNAMIC
x11_handle = SDL_LoadObject(x11_library);
x11ext_handle = SDL_LoadObject(x11ext_library);
if ((x11_handle != NULL) && (x11ext_handle != NULL)) {
#define SDL_X11_SYM(r,fn,arg) p##fn = X11_GetSym(#fn, &rc);
#include "SDL_x11sym.h"
#undef SDL_X11_SYM
}
rc = ((x11_handle != NULL) && (x11ext_handle != NULL));
#define SDL_X11_SYM(r,fn,arg) p##fn = X11_GetSym(#fn, &rc);
#include "SDL_x11sym.h"
#undef SDL_X11_SYM
if (!rc)
SDL_X11_UnloadSymbols(); /* in case one of these loaded... */