File wxWidget-limit-libs-used.patch of Package pgadmin3

diff -rup a/acinclude.m4 b/acinclude.m4
--- a/acinclude.m4	2016-01-07 13:47:31.000000000 +0100
+++ b/acinclude.m4	2017-01-23 16:45:02.066397424 +0100
@@ -743,7 +743,7 @@ AC_DEFUN([SETUP_WXWIDGETS],
 			CFLAGS=`echo $CFLAGS | sed -e "s/-O2/-O0/g"`
 			CXXFLAGS=`echo $CXXFLAGS | sed -e "s/-O2/-O0/g"`
 			
-			pgadmin3_LDADD=`${WX_CONFIG} ${WX_STATIC} --libs std,stc,aui --unicode=yes --debug=yes --version=${WX_VERSION} 2> /dev/null`
+			pgadmin3_LDADD=`${WX_CONFIG} ${WX_STATIC} --libs xrc,html,qa,adv,core,xml,net,base,stc,aui --unicode=yes --debug=yes --version=${WX_VERSION} 2> /dev/null`
 			pgsTest_LDADD=`${WX_CONFIG} ${WX_STATIC} --libs base,core,xml --unicode=yes --debug=yes --version=${WX_VERSION} 2> /dev/null`
 			pgScript_LDADD=`${WX_CONFIG} ${WX_STATIC} --libs base,core,xml --unicode=yes --debug=yes --version=${WX_VERSION} 2> /dev/null`
 		else
@@ -752,7 +752,7 @@ AC_DEFUN([SETUP_WXWIDGETS],
 			CFLAGS=`echo $CFLAGS | sed -e "s/-g //g"`
 			CXXFLAGS=`echo $CXXFLAGS | sed -e "s/-g //g"`
 		
-			pgadmin3_LDADD=`${WX_CONFIG} ${WX_STATIC} --libs std,stc,aui --unicode=yes --debug=no --version=${WX_VERSION} 2> /dev/null`
+			pgadmin3_LDADD=`${WX_CONFIG} ${WX_STATIC} --libs xrc,html,qa,adv,core,xml,net,base,stc,aui --unicode=yes --debug=no --version=${WX_VERSION} 2> /dev/null`
 			pgsTest_LDADD=`${WX_CONFIG} ${WX_STATIC} --libs base,core,xml --unicode=yes --debug=no --version=${WX_VERSION} 2> /dev/null`
 			pgScript_LDADD=`${WX_CONFIG} ${WX_STATIC} --libs base,core,xml --unicode=yes --debug=no --version=${WX_VERSION} 2> /dev/null`
 		fi
diff -rup a/pgadmin/frm/plugins.cpp b/pgadmin/frm/plugins.cpp
--- a/pgadmin/frm/plugins.cpp	2016-01-07 13:47:32.000000000 +0100
+++ b/pgadmin/frm/plugins.cpp	2017-01-23 16:46:52.571092367 +0100
@@ -380,7 +380,7 @@ bool pluginUtilityFactory::CheckEnable(p
 	{
 		// If we need a specific server type, we can't enable unless
 		// we have a connection.
-		if (!obj || !(obj->GetConnection()->GetStatus() == PGCONN_OK))
+		if (!obj || !obj->GetConnection() || !(obj->GetConnection()->GetStatus() == PGCONN_OK))
 			return false;
 
 		// Get the server type.
openSUSE Build Service is sponsored by