# HG changeset patch # User Ryan C. Gordon # Date 1181721250 0 # Node ID b1d5b56aa54950e3b919ca93564aecbf0485b431 # Parent 3868bebb9f5b4405efa0ae4a7de5b6dc61827066 Date: Mon, 4 Jun 2007 06:17:59 +0000 (UTC) From: George Gensure Subject: [SDL] error removal patch for SDL_x11dyn.c I found that calling SDL_GetError when an error hasn't necessarily occurred is still reporting problems from loadso regarding dynamic functions in X11. I've added the following to my local copy to avoid revealing the 'many library lookup' approach adopted by x11dyn.c: diff -r 3868bebb9f5b -r b1d5b56aa549 src/video/x11/SDL_x11dyn.c --- a/src/video/x11/SDL_x11dyn.c Wed Jun 13 04:13:21 2007 +0000 +++ b/src/video/x11/SDL_x11dyn.c Wed Jun 13 07:54:10 2007 +0000 @@ -73,6 +73,11 @@ } } + if (*fn != NULL) + SDL_ClearError(); + else + SDL_SetError("Failed to load function %s from x11libs", fnname); + #if DEBUG_DYNAMIC_X11 if (*fn != NULL) printf("X11: Found '%s' in %s (%p)\n", fnname, x11libs[i].libname, *fn);