WinRT: added an extra NULL pointer check for SDL_*ScreenSaver() backend code
authorDavid Ludwig <dludwig@pobox.com>
Wed, 31 Aug 2016 12:52:55 -0400
changeset 10300c5300ace12f2
parent 10299 5a45e29a6ea7
child 10301 a25d9c643cfb
WinRT: added an extra NULL pointer check for SDL_*ScreenSaver() backend code
src/video/winrt/SDL_winrtvideo.cpp
     1.1 --- a/src/video/winrt/SDL_winrtvideo.cpp	Tue Aug 30 12:58:00 2016 -0700
     1.2 +++ b/src/video/winrt/SDL_winrtvideo.cpp	Wed Aug 31 12:52:55 2016 -0400
     1.3 @@ -827,7 +827,7 @@
     1.4  WINRT_SuspendScreenSaver(_THIS)
     1.5  {
     1.6      SDL_VideoData *driverdata = (SDL_VideoData *)_this->driverdata;
     1.7 -    if (driverdata->displayRequest) {
     1.8 +    if (driverdata && driverdata->displayRequest) {
     1.9          ABI::Windows::System::Display::IDisplayRequest * displayRequest = (ABI::Windows::System::Display::IDisplayRequest *) driverdata->displayRequest;
    1.10          if (_this->suspend_screensaver) {
    1.11              displayRequest->RequestActive();