Prevent null pointer dereference defect

This commit is contained in:
twinaphex 2016-09-22 03:59:02 +02:00
parent ca4086622a
commit 017bf34d71

View File

@ -1041,7 +1041,8 @@ bool netplay_command(netplay_t* netplay, enum netplay_cmd cmd,
return true;
error:
snprintf(m, sizeof(m), msg, command_str);
if (msg)
snprintf(m, sizeof(m), msg, command_str);
RARCH_WARN("%s\n", m);
runloop_msg_queue_push(m, 1, 180, false);
return false;