From ff103774e6e8502094ccd7118280f61ec228a6c1 Mon Sep 17 00:00:00 2001 From: Gilles Depeyrot Date: Thu, 14 Nov 2002 13:48:32 +0000 Subject: [PATCH] use local variable since shl_findsym modifies the handle argument to indicate where the symbol was found git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17868 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/dynload.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/common/dynload.cpp b/src/common/dynload.cpp index 3ab734eafc..4c86a5e19a 100644 --- a/src/common/dynload.cpp +++ b/src/common/dynload.cpp @@ -264,7 +264,10 @@ void *wxDynamicLibrary::GetSymbol(const wxString &name, bool *success) const symbol = dlsym( m_handle, name.fn_str() ); #elif defined(HAVE_SHL_LOAD) - if( shl_findsym( &m_handle, name.fn_str(), TYPE_UNDEFINED, &symbol ) != 0 ) + // use local variable since shl_findsym modifies the handle argument + // to indicate where the symbol was found (GD) + wxDllType the_handle = m_handle; + if( shl_findsym( &the_handle, name.fn_str(), TYPE_UNDEFINED, &symbol ) != 0 ) symbol = 0; #elif defined(__WINDOWS__)