summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-11-19 12:36:09 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-11-19 22:19:38 +0100
commitd4a4c9717abccd04fef9ef032092107bb8fae005 (patch)
tree36de0e730b4a146c838edb7720142cf1898e8940
parent2972eeaf59def0d80e8a2c8ffd713ec98cef4305 (diff)
don't crash if a linked to object is deleted after the doc is loaded
Change-Id: Ia6ab1261745d223dcf84b638edf6a64d46bc6f4b Reviewed-on: https://gerrit.libreoffice.org/83201 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sc/source/ui/app/client.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/sc/source/ui/app/client.cxx b/sc/source/ui/app/client.cxx
index 338be8331cfb..b58efdf5218d 100644
--- a/sc/source/ui/app/client.cxx
+++ b/sc/source/ui/app/client.cxx
@@ -21,6 +21,7 @@
#include <com/sun/star/embed/NoVisualAreaSizeException.hpp>
#include <toolkit/helper/vclunohelper.hxx>
+#include <tools/diagnose_ex.h>
#include <sfx2/objsh.hxx>
#include <svx/svditer.hxx>
#include <svx/svdobj.hxx>
@@ -189,9 +190,9 @@ void ScClient::ViewChanged()
awt::Size aSz;
try {
aSz = xObj->getVisualAreaSize( GetAspect() );
- } catch ( embed::NoVisualAreaSizeException& )
- {
- OSL_FAIL("The visual area size must be available!");
+ } catch (const uno::Exception&) {
+ TOOLS_WARN_EXCEPTION("sc", "The visual area size must be available!");
+ return; // leave it unchanged on failure
}
MapUnit aMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( GetAspect() ) );