Skip to content

Commit

Permalink
WinRT: added an extra NULL pointer check for SDL_*ScreenSaver() backe…
Browse files Browse the repository at this point in the history
…nd code
  • Loading branch information
DavidLudwig committed Aug 31, 2016
1 parent ebb0589 commit f5d43cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/video/winrt/SDL_winrtvideo.cpp
Expand Up @@ -827,7 +827,7 @@ void
WINRT_SuspendScreenSaver(_THIS)
{
SDL_VideoData *driverdata = (SDL_VideoData *)_this->driverdata;
if (driverdata->displayRequest) {
if (driverdata && driverdata->displayRequest) {
ABI::Windows::System::Display::IDisplayRequest * displayRequest = (ABI::Windows::System::Display::IDisplayRequest *) driverdata->displayRequest;
if (_this->suspend_screensaver) {
displayRequest->RequestActive();
Expand Down

0 comments on commit f5d43cf

Please sign in to comment.