Kaydet (Commit) 17dded39 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1242420 Dereference after null check

Change-Id: I3ccfcc618b936cab520926adb3a3ff770d000aed
üst 15174068
...@@ -123,7 +123,7 @@ void TabControl::ImplInit( vcl::Window* pParent, WinBits nStyle ) ...@@ -123,7 +123,7 @@ void TabControl::ImplInit( vcl::Window* pParent, WinBits nStyle )
if( IsNativeControlSupported(CTRL_TAB_PANE, PART_ENTIRE_CONTROL) ) if( IsNativeControlSupported(CTRL_TAB_PANE, PART_ENTIRE_CONTROL) )
EnableChildTransparentMode( true ); EnableChildTransparentMode( true );
if ( pParent->IsDialog() ) if (pParent && pParent->IsDialog())
pParent->AddChildEventListener( LINK( this, TabControl, ImplWindowEventListener ) ); pParent->AddChildEventListener( LINK( this, TabControl, ImplWindowEventListener ) );
} }
...@@ -192,7 +192,8 @@ TabControl::TabControl( vcl::Window* pParent, WinBits nStyle ) : ...@@ -192,7 +192,8 @@ TabControl::TabControl( vcl::Window* pParent, WinBits nStyle ) :
TabControl::~TabControl() TabControl::~TabControl()
{ {
if ( GetParent()->IsDialog() ) Window *pParent = GetParent();
if (pParent && pParent->IsDialog())
GetParent()->RemoveChildEventListener( LINK( this, TabControl, ImplWindowEventListener ) ); GetParent()->RemoveChildEventListener( LINK( this, TabControl, ImplWindowEventListener ) );
ImplFreeLayoutData(); ImplFreeLayoutData();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment