From 8e304f80bbb7e2d6bab449d97bc6cb59d73069f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Sat, 24 May 2014 11:54:48 +0100 Subject: [PATCH] coverity#1027650 Unchecked dynamic_cast Change-Id: Ic1973463e4c6d85bbfacc077f58f7d1fe16de73a --- svx/source/sidebar/insert/InsertPropertyPanel.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/svx/source/sidebar/insert/InsertPropertyPanel.cxx b/svx/source/sidebar/insert/InsertPropertyPanel.cxx index 7a8bf59f128f..9cc47bc87042 100644 --- a/svx/source/sidebar/insert/InsertPropertyPanel.cxx +++ b/svx/source/sidebar/insert/InsertPropertyPanel.cxx @@ -99,7 +99,8 @@ IMPL_LINK(InsertPropertyPanel, WindowEventListener, VclSimpleEvent*, pEvent) if (pEvent->GetId() != VCLEVENT_TOOLBOX_SELECT) return 1; - Window* pWindow = dynamic_cast(pEvent)->GetWindow(); + VclWindowEvent* pWindowEvent = dynamic_cast(pEvent); + Window* pWindow = pWindowEvent ? pWindowEvent->GetWindow() : NULL; ToolBox* pToolBox = dynamic_cast(pWindow); if (pToolBox == NULL) return 1;