Skip to content

Commit

Permalink
fix crash with nogui on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
gfgtdf committed Mar 5, 2016
1 parent 6662f4e commit 36ac558
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/desktop/windows_tray_notification.cpp
Expand Up @@ -193,8 +193,9 @@ HWND windows_tray_notification::get_window_handle()
#if !SDL_VERSION_ATLEAST(2, 0, 0)
if (SDL_GetWMInfo(&wmInfo) != 1) {
#else
sdl::twindow* window = CVideo::get_singleton().get_window();
// SDL 1.2 keeps track of window handles internally whereas SDL 2.0 allows the caller control over which window to use
if (SDL_GetWindowWMInfo (static_cast<SDL_Window *> (*CVideo::get_singleton().get_window()), &wmInfo) != SDL_TRUE) {
if (!window || SDL_GetWindowWMInfo (static_cast<SDL_Window *> (*window), &wmInfo) != SDL_TRUE) {
#endif
return NULL;
}
Expand Down

0 comments on commit 36ac558

Please sign in to comment.