diff --git a/src/os/gfx/win32/os_gfx_win32.c b/src/os/gfx/win32/os_gfx_win32.c index 7874d97e..5b8ab880 100644 --- a/src/os/gfx/win32/os_gfx_win32.c +++ b/src/os/gfx/win32/os_gfx_win32.c @@ -1382,8 +1382,11 @@ internal void os_focus_external_window(OS_Handle handle) { HWND hwnd = (HWND)handle.u64[0]; - SetForegroundWindow(hwnd); - SetFocus(hwnd); + if(hwnd != 0) + { + SetForegroundWindow(hwnd); + SetFocus(hwnd); + } } ////////////////////////////////