WinRT: added an extra NULL pointer check for SDL_*ScreenSaver() backend code

David Ludwig 2016-08-31 12:52:55 -04:00
parent ebb058910d
commit f5d43cf912
1 changed files with 1 additions and 1 deletions

View File

@ -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();