Stricter arguments checking

This commit is contained in:
Pierre Pronchery 2014-05-03 19:12:39 +02:00
parent e7b7b4030a
commit 56ab5556ef

View File

@ -103,7 +103,7 @@ AppTransport * apptransport_new(AppTransportMode mode,
error_set_code(1, "%s", "Invalid transport"); error_set_code(1, "%s", "Invalid transport");
return NULL; return NULL;
} }
if(event == NULL) if(name == NULL || event == NULL)
{ {
error_set_code(1, "%s", "Invalid arguments"); error_set_code(1, "%s", "Invalid arguments");
return NULL; return NULL;