From e48ac4a3de5e871b8c80bec6ecaac4ed1c8c1409 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Mon, 7 Feb 2022 16:14:50 -0500 Subject: [PATCH] Debugger: Add missing NULL check in ReportUserInterface. Fixes #16565. --- .../debugger/user_interface/report/ReportUserInterface.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/apps/debugger/user_interface/report/ReportUserInterface.cpp b/src/apps/debugger/user_interface/report/ReportUserInterface.cpp index fb5f1f3286..8dc2e4ce4c 100644 --- a/src/apps/debugger/user_interface/report/ReportUserInterface.cpp +++ b/src/apps/debugger/user_interface/report/ReportUserInterface.cpp @@ -38,7 +38,8 @@ ReportUserInterface::~ReportUserInterface() if (fShowSemaphore >= 0) delete_sem(fShowSemaphore); - fTeam->RemoveListener(this); + if (fTeam != NULL) + fTeam->RemoveListener(this); }