summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-09-30 14:50:08 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-10-01 15:43:25 +0200
commitafb95717c2c17d6f6c54abf0a0719d082d00e7f5 (patch)
tree54ca99dc7e818a3c9228815b9780e04aa3da628b /framework
parent49b14589e04cd6f3970b2f9c81ff574aa702bf76 (diff)
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/+/122898 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'framework')
-rw-r--r--framework/source/services/autorecovery.cxx11
1 files changed, 0 insertions, 11 deletions
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index 9fc7470bf398..7b66409014b9 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -1966,17 +1966,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() );