By Harry Coin: make IsEmptyStr NULL-pointer-safe.
[citadel.git] / libcitadel / lib / libcitadel.h
index 3e48a35f390a1e29782eb237c0376ecaa3261b61..d7da488f10c7a7ab48dbc265924b7da184f96417 100644 (file)
@@ -108,7 +108,7 @@ typedef enum _room_views {
 #define BLOG_EUIDBUF_SIZE      40
 
 #ifndef IsEmptyStr
-#define IsEmptyStr(a) ((a)[0] == '\0')
+#define IsEmptyStr(a) ( ( (a) == NULL ) || ((a)[0] == '\0') )
 #endif