Browse Source

cmText.c cmTextIsEmpty() now returns true when input == NULL.

master
kevin 11 years ago
parent
commit
a40294f9a9
1 changed files with 4 additions and 3 deletions
  1. 4
    3
      cmText.c

+ 4
- 3
cmText.c View File

@@ -603,9 +603,10 @@ cmChar_t* cmTextAppendChar( cmChar_t* s, cmChar_t c, unsigned n )
603 603
 
604 604
 bool cmTextIsEmpty( const cmChar_t* s )
605 605
 {
606
-  for(; *s; ++s )
607
-    if( !isspace(*s) )
608
-      return false;
606
+  if( s!=NULL )
607
+    for(; *s; ++s )
608
+      if( !isspace(*s) )
609
+        return false;
609 610
   return true;
610 611
 }
611 612
 

Loading…
Cancel
Save