diff --git a/src/video/haiku/SDL_bvideo.cc b/src/video/haiku/SDL_bvideo.cc index a3bf1da74f..ae37a733fb 100644 --- a/src/video/haiku/SDL_bvideo.cc +++ b/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)