Prevent NULL pointer dereference

This commit is contained in:
twinaphex 2020-04-29 14:38:11 +02:00
parent 9b8c596057
commit bb27496e2e
3 changed files with 9 additions and 5 deletions

View File

@ -349,8 +349,9 @@ static bool gdi_gfx_frame(void *data, const void *frame,
InvalidateRect(hwnd, NULL, false);
gdi->ctx_driver->update_window_title(
video_info->context_data);
if (gdi->ctx_driver->update_window_title)
gdi->ctx_driver->update_window_title(
video_info->context_data);
return true;
}

View File

@ -869,8 +869,9 @@ static bool gl1_gfx_frame(void *data, const void *frame,
if (msg)
font_driver_render_msg(gl1, msg, NULL, NULL);
gl1->ctx_driver->update_window_title(
video_info->context_data);
if (gl1->ctx_driver->update_window_title)
gl1->ctx_driver->update_window_title(
video_info->context_data);
/* Screenshots. */
if (gl1->readback_buffer_screenshot)

View File

@ -454,7 +454,9 @@ static bool vg_frame(void *data, const void *frame,
vg_draw_message(vg, msg);
#endif
vg->ctx_driver->update_window_title(video_info->context_data);
if (vg->ctx_driver->update_window_title)
vg->ctx_driver->update_window_title(video_info->context_data);
vg->ctx_driver->swap_buffers(video_info->context_data);
return true;