deal with empty param to serialize()

This commit is contained in:
Anthony Minessale committed 2010-07-12 15:37:16 -05:00
1 parent 85d3428372
commit 60af226890
1 file changed
+1 -1
+1 -1
View File
@@ -355,7 +355,7 @@ const char *ESLevent::serialize(const char *format)
return "";
}
if (!strcasecmp(format, "json")) {
if (format && !strcasecmp(format, "json")) {
esl_event_serialize_json(event, &serialized_string);
return serialized_string;
}