Kaydet (Commit) 5a28f236 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Fix null pointer dereference

...when FindTextToolbarController instance is immediately disposed after
creation (as will happen in to-be-updated CppunitTest_services).

Change-Id: I459f2b2ac3eecc728b45e8493c3f8988a6c121a1
üst 8d704bb8
...@@ -416,9 +416,12 @@ void SAL_CALL FindTextToolbarController::dispose() throw ( css::uno::RuntimeExce ...@@ -416,9 +416,12 @@ void SAL_CALL FindTextToolbarController::dispose() throw ( css::uno::RuntimeExce
SearchToolbarControllersManager::createControllersManager().freeController(m_xFrame, css::uno::Reference< css::frame::XStatusListener >(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY), m_aCommandURL); SearchToolbarControllersManager::createControllersManager().freeController(m_xFrame, css::uno::Reference< css::frame::XStatusListener >(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY), m_aCommandURL);
svt::ToolboxController::dispose(); svt::ToolboxController::dispose();
SearchToolbarControllersManager::createControllersManager().saveSearchHistory(m_pFindTextFieldControl); if (m_pFindTextFieldControl != nullptr) {
delete m_pFindTextFieldControl; SearchToolbarControllersManager::createControllersManager()
m_pFindTextFieldControl = 0; .saveSearchHistory(m_pFindTextFieldControl);
delete m_pFindTextFieldControl;
m_pFindTextFieldControl = 0;
}
} }
// XInitialization // XInitialization
......
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