Prevent crash by checking if msg is NULL before doing strlcpy call

This commit is contained in:
twinaphex 2016-11-06 14:10:25 +01:00
parent 9a87dabca1
commit feacc56fff

View File

@ -2121,7 +2121,7 @@ void video_driver_frame(const void *data, unsigned width,
video_driver_msg[0] = '\0';
if (runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_PULL, &msg))
if (runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_PULL, &msg) && msg)
strlcpy(video_driver_msg, msg, sizeof(video_driver_msg));
if (!current_video || !current_video->frame(