coverity#1027650 Unchecked dynamic_cast

Change-Id: Ic1973463e4c6d85bbfacc077f58f7d1fe16de73a
This commit is contained in:
Caolán McNamara
2014-05-24 11:54:48 +01:00
parent 10c14f13a7
commit 8e304f80bb

View File

@@ -99,7 +99,8 @@ IMPL_LINK(InsertPropertyPanel, WindowEventListener, VclSimpleEvent*, pEvent)
if (pEvent->GetId() != VCLEVENT_TOOLBOX_SELECT)
return 1;
Window* pWindow = dynamic_cast<VclWindowEvent*>(pEvent)->GetWindow();
VclWindowEvent* pWindowEvent = dynamic_cast<VclWindowEvent*>(pEvent);
Window* pWindow = pWindowEvent ? pWindowEvent->GetWindow() : NULL;
ToolBox* pToolBox = dynamic_cast<ToolBox*>(pWindow);
if (pToolBox == NULL)
return 1;