From 9126a641f0223eba065ac5c356f5e940afc61af7 Mon Sep 17 00:00:00 2001 From: Galen Williamson Date: Tue, 6 Feb 2024 23:51:30 -0500 Subject: [PATCH] removed potential crash when opening a url opens a new window --- ui/uinotification.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/uinotification.cpp b/ui/uinotification.cpp index 98a2df4..1c5dbad 100644 --- a/ui/uinotification.cpp +++ b/ui/uinotification.cpp @@ -170,7 +170,9 @@ void NotificationListener::OnAfterCloseFile(UIContext* context, FileContext* fil void NotificationListener::OnViewChange(UIContext* context, ViewFrame* frame, const QString& type) { - GlobalDebuggerUI::GetForContext(context)->SetActiveFrame(frame); + auto ui = GlobalDebuggerUI::GetForContext(context); + if (ui != nullptr) + ui->SetActiveFrame(frame); }