Explorar el Código

haiku: check if the returned _SDL_GLView is null or not

captain0xff hace 6 meses
padre
commit
06eb10c518
Se han modificado 1 ficheros con 3 adiciones y 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)