diff --git a/uppsrc/CtrlCore/GtkWnd.cpp b/uppsrc/CtrlCore/GtkWnd.cpp index 1aa2f53d1..d54b68c44 100644 --- a/uppsrc/CtrlCore/GtkWnd.cpp +++ b/uppsrc/CtrlCore/GtkWnd.cpp @@ -122,7 +122,7 @@ Ctrl *Ctrl::GetOwner() { GuiLock __; Top *top = GetTop(); - return IsOpen() ? top->owner : NULL; + return top && IsOpen() ? top->owner : nullptr; } Ctrl *Ctrl::GetActiveCtrl() @@ -602,4 +602,6 @@ Vector SplitCmdLine__(const char *cmd) } -#endif \ No newline at end of file + +#endif +