Update of /cvsroot/plib/plib/demos/p-guide/src
In directory usw-pr-cvs1:/tmp/cvs-serv20633
Modified Files:
StatusWindow.cxx
Log Message:
If, after the start of P-Guide you click on "label", the old version will crash
since active_widget is NULL and it tries to find active_widget->label_text
Index: StatusWindow.cxx
===================================================================
RCS file: /cvsroot/plib/plib/demos/p-guide/src/StatusWindow.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- StatusWindow.cxx 31 Aug 2002 08:14:39 -0000 1.8
+++ StatusWindow.cxx 1 Sep 2002 11:40:10 -0000 1.9
@@ -588,14 +588,14 @@
static void label_cb ( puObject *ob )
{
- //if ( active_widget )
- //{
+ if ( active_widget )
+ {
if (active_widget->label_text)
delete active_widget->label_text ;
active_widget->label_text = new char [ strlen ( ob->getStringValue () ) + 1 ] ;
strcpy ( active_widget->label_text, ob->getStringValue () ) ;
active_widget->obj->setLabel ( active_widget->label_text ) ;
- //}
+ }
}
static void label_place_cb ( puObject *ob )
|