From 404b6d40d3b301251d6ff9ab3d633282cbfea81e Mon Sep 17 00:00:00 2001 From: John Scipione Date: Thu, 24 Jul 2014 22:08:02 -0400 Subject: [PATCH] Tracker: Unchecked dynamic_cast, CID 603123 --- src/kits/tracker/FindPanel.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/kits/tracker/FindPanel.cpp b/src/kits/tracker/FindPanel.cpp index 303f8e13e2..01227aa76e 100644 --- a/src/kits/tracker/FindPanel.cpp +++ b/src/kits/tracker/FindPanel.cpp @@ -2326,7 +2326,9 @@ FindPanel::RestoreWindowState(const BNode* node) fTemporaryCheck->SetValue(saveMoreOptions.temporary); fQueryName->SetModificationMessage(NULL); - FillCurrentQueryName(fQueryName, dynamic_cast(Window())); + FindWindow* findWindow = dynamic_cast(Window()); + if (findWindow != NULL) + FillCurrentQueryName(fQueryName, findWindow); // set modification message after checking the temporary check box, // and filling out the text control so that we do not always trigger