Explorar o código

haiku: check if the returned _SDL_GLView is null or not

captain0xff hai 6 meses
pai
achega
06eb10c518
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      src/video/haiku/SDL_bvideo.cc

+ 3 - 0
src/video/haiku/SDL_bvideo.cc

@@ -241,6 +241,9 @@ static bool HAIKU_SetRelativeMouseMode(bool enabled)
 
 	SDL_BWin *bewin = _ToBeWin(window);
 	BGLView *_SDL_GLView = bewin->GetGLView();
+    if (_SDL_GLView == NULL) {
+        return false;
+    }
 
 	bewin->Lock();
 	if (enabled)