diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-12-15 21:23:38 +0100 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-12-27 16:51:29 +0100 |
commit | 6b9fdc5860b710bd9bc864b11e7e44ca844b68c8 (patch) | |
tree | f5599a9e1485fd994bb6a792392debffe6256d1c /sd/source/ui/tools | |
parent | 3806388288cc4a9c229bb0c7aa14d806406d4bf4 (diff) |
Bail out early (so to avoid unuseful dynamic_casts)
Change-Id: Ie1940e2178585c56cecdbbcff9c9e57aa8b05459
Diffstat (limited to 'sd/source/ui/tools')
-rw-r--r-- | sd/source/ui/tools/PreviewRenderer.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx index e2468c7630d7..fa63de954286 100644 --- a/sd/source/ui/tools/PreviewRenderer.cxx +++ b/sd/source/ui/tools/PreviewRenderer.cxx @@ -491,8 +491,11 @@ Image PreviewRenderer::ScaleBitmap ( void PreviewRenderer::Notify(SfxBroadcaster&, const SfxHint& rHint) { + if (!mpDocShellOfView) + return; + const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint); - if (pSimpleHint && mpDocShellOfView && pSimpleHint->GetId() == SFX_HINT_DYING) + if (pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING) { // The doc shell is dying. Our view uses its item pool and // has to be destroyed as well. The next call to |