diff options
-rw-r--r-- | chart2/source/controller/main/DrawCommandDispatch.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx b/chart2/source/controller/main/DrawCommandDispatch.cxx index 7a6a07b1ae41..7540d7962eae 100644 --- a/chart2/source/controller/main/DrawCommandDispatch.cxx +++ b/chart2/source/controller/main/DrawCommandDispatch.cxx @@ -371,8 +371,8 @@ void DrawCommandDispatch::execute( const OUString& rCommand, const Sequence< bea if ( pObj ) { SdrPageView* pPageView = pDrawViewWrapper->GetSdrPageView(); - pDrawViewWrapper->InsertObjectAtView( pObj, *pPageView ); - m_pChartController->SetAndApplySelection(Reference<drawing::XShape>(pObj->getUnoShape(), uno::UNO_QUERY)); + if (pDrawViewWrapper->InsertObjectAtView(pObj, *pPageView)) + m_pChartController->SetAndApplySelection(Reference<drawing::XShape>(pObj->getUnoShape(), uno::UNO_QUERY)); if ( nFeatureId == COMMAND_ID_DRAW_TEXT ) { m_pChartController->StartTextEdit(); |