mirror of
https://github.com/libretro/RetroArch
synced 2025-02-21 09:39:56 +00:00
Additional null check in video_driver.c
I have managed to trigger a null pointer exception on one of these two functions, so for safety, I added in null checks for the structs and function pointers.
This commit is contained in:
parent
911072fb69
commit
bafb23edc3
@ -564,12 +564,12 @@ const video_poke_interface_t *video_driver_get_poke(void)
|
||||
|
||||
static bool video_context_has_focus(void)
|
||||
{
|
||||
return current_video_context.has_focus(video_context_data);
|
||||
return current_video_context.has_focus && current_video_context.has_focus(video_context_data);
|
||||
}
|
||||
|
||||
static bool video_driver_has_focus(void)
|
||||
{
|
||||
return current_video->focus(video_driver_data);
|
||||
return current_video && current_video->focus && current_video->focus(video_driver_data);
|
||||
}
|
||||
|
||||
static bool null_driver_has_focus(void)
|
||||
|
Loading…
x
Reference in New Issue
Block a user