Update of /cvsroot/plib/plib/src/pui
In directory usw-pr-cvs1:/tmp/cvs-serv8012
Modified Files:
puObject.cxx
Log Message:
In puObject::draw_[legend|label], avoid calculating size of a NULL string
Index: puObject.cxx
===================================================================
RCS file: /cvsroot/plib/plib/src/pui/puObject.cxx,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- puObject.cxx 28 Feb 2002 20:54:10 -0000 1.38
+++ puObject.cxx 28 Feb 2002 21:22:27 -0000 1.39
@@ -267,6 +267,9 @@
void puObject::draw_legend ( int dx, int dy )
{
+ if ( legend == NULL )
+ return ;
+
int xx, yy ;
int lgap = PUSTR_LGAP ;
@@ -358,6 +361,9 @@
void puObject::draw_label ( int dx, int dy )
{
+ if ( label == NULL )
+ return ;
+
int xx, yy ;
/* If greyed out then halve the opacity when drawing the label */
@@ -514,3 +520,4 @@
lowlight () ;
return FALSE ;
}
+
|