From 3f72ed451f4da2c8926467744f44dcab3e1d7af1 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 28 Jul 2011 00:12:42 +0000 Subject: [PATCH] Make KGTK::PR_FindFunctionSymbol more robust git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kgtk-qt3@1243493 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- gtk2/kgtk2.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gtk2/kgtk2.c b/gtk2/kgtk2.c index 0fa934b..1c97f8a 100644 --- a/gtk2/kgtk2.c +++ b/gtk2/kgtk2.c @@ -1946,7 +1946,14 @@ void * PR_FindFunctionSymbol(struct PR_LoadLibrary *lib, const char *raw_name) rv=real_dlsym(RTLD_NEXT, raw_name); } - return rv ? rv : realFunction(lib, raw_name); +#ifdef KGTK_DEBUG_DLSYM + printf("KGTK::PR_FindFunctionSymbol found? %d\n", (rv || realFunction) ? 1 : 0); +#endif + + if ((rv != NULL) || (realFunction != NULL)) + return rv ? rv : realFunction(lib, raw_name); + else + return NULL; } #ifdef HAVE_DLVSYM