From 06eb10c51859cc51b9d20b3183d811ae5fd7f273 Mon Sep 17 00:00:00 2001 From: captain0xff Date: Mon, 17 Feb 2025 01:17:13 +0530 Subject: [PATCH] haiku: check if the returned _SDL_GLView is null or not --- src/video/haiku/SDL_bvideo.cc | 3 +++ 1 file changed, 3 insertions(+) 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)