Static analyzer bug fixes
[silc.git] / apps / irssi / src / silc / core / client_ops.c
index a4d53b76504b981fcbf7a0a197225d8d4e2f0c2a..d73c7bee68e2d963ed8792ba5308b6771830d6e7 100644 (file)
@@ -946,7 +946,7 @@ void silc_notify(SilcClient client, SilcClientConnection conn,
        tmp = cp;
       }
 
-      chanrec->topic = *tmp == '\0' ? NULL : g_strdup(tmp);
+      chanrec->topic = (tmp && *tmp == '\0' ? NULL : g_strdup(tmp));
       signal_emit("channel topic changed", 1, chanrec);
 
       silc_free(dm);