r283: Don't dereference a command if it's empty
[nbd.git] / nbd-server.c
index b3e5e61..d7109c6 100644 (file)
@@ -1259,7 +1259,7 @@ int do_run(gchar* command, gchar* file) {
        gchar* cmd;
        int retval=0;
 
-       if(*command) {
+       if(command && *command) {
                cmd = g_strdup_printf(command, file);
                retval=system(cmd);
                g_free(cmd);