diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-09-30 14:50:08 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-10-04 13:38:51 +0200 |
commit | d800bc83539430815d4f6da103cb345614e532b7 (patch) | |
tree | d87122f3975bb41c8689a0bf01827587f457c8c8 /framework | |
parent | ec8d0ae23eea3dcba97c7f78aa9ca0e6cec0bda9 (diff) |
WaE: 'else' branch doesn't make sense, dereferences null
if xModel.is() is false then xModel->getCurrentController() is just going to
crash.
like this since it was introduced in
commit eafba820349005ea5426cab58911f9ff99969966
Date: Tue Jan 5 22:32:38 2010 +0100
autorecovery: define a new css.document.XDocumentRecovery interface, implement it in both SFX and DBACCESS, and use it in the autorecovery
Change-Id: I8ea43a0679d43cb9b865ecae5260129d17b6a386
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122927
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/services/autorecovery.cxx | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx index 495d22cee201..d61722f0c08a 100644 --- a/framework/source/services/autorecovery.cxx +++ b/framework/source/services/autorecovery.cxx @@ -1967,17 +1967,6 @@ void AutoRecovery::implts_collectActiveViewNames( AutoRecovery::TDocumentInfo& i aViewNames.push_back( sViewName ); } } - else - { - const Reference< XController2 > xController( xModel->getCurrentController(), UNO_QUERY ); - OUString sViewName; - if ( xController.is() ) - sViewName = xController->getViewControllerName(); - OSL_ENSURE( !sViewName.isEmpty(), "AutoRecovery::implts_collectActiveViewNames: (no XController2 ->) no view name -> no recovery of this view!" ); - - if ( !sViewName.isEmpty() ) - aViewNames.push_back( sViewName ); - } i_rInfo.ViewNames.realloc( aViewNames.size() ); ::std::copy( aViewNames.begin(), aViewNames.end(), i_rInfo.ViewNames.getArray() ); |