Code

including typecheck trying to prevent #1432680
authorrwst <rwst@users.sourceforge.net>
Fri, 24 Feb 2006 17:23:48 +0000 (17:23 +0000)
committerrwst <rwst@users.sourceforge.net>
Fri, 24 Feb 2006 17:23:48 +0000 (17:23 +0000)
src/ui/dialog/dialog.cpp

index aa48f7eb81b4eb9a3a6edfffb1fe13ef061d8da1..b4e491bf960bd81dbc007f1072559416722a6d1e 100644 (file)
@@ -15,6 +15,7 @@
 # include <config.h>
 #endif
 
+#include <typeinfo>
 #include <gtkmm/stock.h>
 #include <gtk/gtk.h>
 
@@ -111,12 +112,20 @@ Dialog::read_geometry()
 
 void hideCallback(GtkObject *object, gpointer dlgPtr)
 {
+    Dialog* example;
+    if ((void*)dlgPtr == 0 || typeid(dlgPtr) != typeid(example))
+            return;
+
     Dialog *dlg = (Dialog *)dlgPtr;
     dlg->onHideF12();
 }
 
 void unhideCallback(GtkObject *object, gpointer dlgPtr)
 {
+    Dialog* example;
+    if ((void*)dlgPtr == 0 || typeid(dlgPtr) != typeid(example))
+            return;
+
     Dialog *dlg = (Dialog *)dlgPtr;
     dlg->onShowF12();
 }