diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-10-23 16:53:08 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-10-24 09:24:56 +0100 |
commit | 096452279717d2d13b6140fa80b1442a59e5e874 (patch) | |
tree | 6a6915e2a0aeb21a0f141adb7507ded72ffbdb08 /svx | |
parent | febbda147aab20d7f25d1e1155b2d49bab0cee9a (diff) |
coverity#704836 Dereference after null check
Change-Id: Ia2ac113df3fe378308279ecdc4d14ccba9abfae7
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/table/tablecontroller.cxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index 3cd25b4505b0..13699d485483 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -148,26 +148,26 @@ SvxTableController::SvxTableController( SdrObjEditView* pView, const SdrObject* , mnUpdateEvent( 0 ) { if( pObj ) - mpModel = pObj->GetModel(); - - if( mxTableObj.is() ) { - static_cast< const SdrTableObj* >( pObj )->getActiveCellPos( maCursorFirstPos ); - maCursorLastPos = maCursorFirstPos; + mpModel = pObj->GetModel(); - Reference< XTable > xTable( static_cast< const SdrTableObj* >( pObj )->getTable() ); - if( xTable.is() ) + if( mxTableObj.is() ) { - mxModifyListener = new SvxTableControllerModifyListener( this ); - xTable->addModifyListener( mxModifyListener ); + static_cast< const SdrTableObj* >( pObj )->getActiveCellPos( maCursorFirstPos ); + maCursorLastPos = maCursorFirstPos; - mxTable.set( dynamic_cast< TableModel* >( xTable.get() ) ); + Reference< XTable > xTable( static_cast< const SdrTableObj* >( pObj )->getTable() ); + if( xTable.is() ) + { + mxModifyListener = new SvxTableControllerModifyListener( this ); + xTable->addModifyListener( mxModifyListener ); + + mxTable.set( dynamic_cast< TableModel* >( xTable.get() ) ); + } } } } - - SvxTableController::~SvxTableController() { if( mnUpdateEvent ) |