[Libreoffice-commits] core.git: sw/source
Samuel Mehrbrodt (via logerrit)
logerrit at kemper.freedesktop.org
Mon Oct 28 16:23:48 UTC 2019
sw/source/uibase/app/docsh.cxx | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
New commits:
commit d1b9267a646983ca9f301871056ae611d27be171
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Mon Oct 28 16:01:15 2019 +0100
Commit: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Mon Oct 28 17:17:08 2019 +0100
tdf#128418 Fix crash in print preview
Change-Id: I2a8c5511563ac3205722d63f22cde472a8aaddde
Reviewed-on: https://gerrit.libreoffice.org/81610
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index 08cdb0ca6245..1e0f4ac20a12 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -1062,7 +1062,7 @@ void SwDocShell::GetState(SfxItemSet& rSet)
case FN_OUTLINE_TO_IMPRESS:
{
SvtModuleOptions aMOpt;
- if ( !aMOpt.IsImpress() || GetViewShell()->isExportLocked() )
+ if (!aMOpt.IsImpress() || (GetViewShell() && GetViewShell()->isExportLocked()))
rSet.DisableItem( nWhich );
}
[[fallthrough]];
@@ -1084,12 +1084,14 @@ void SwDocShell::GetState(SfxItemSet& rSet)
break;
case FN_NEW_GLOBAL_DOC:
- if ( dynamic_cast< const SwGlobalDocShell *>( this ) != nullptr || GetViewShell()->isExportLocked() )
+ if (dynamic_cast<const SwGlobalDocShell*>(this) != nullptr
+ || (GetViewShell() && GetViewShell()->isExportLocked()))
rSet.DisableItem( nWhich );
break;
case FN_NEW_HTML_DOC:
- if( dynamic_cast< const SwWebDocShell *>( this ) != nullptr || GetViewShell()->isExportLocked() )
+ if (dynamic_cast<const SwWebDocShell*>(this) != nullptr
+ || (GetViewShell() && GetViewShell()->isExportLocked()))
rSet.DisableItem( nWhich );
break;
More information about the Libreoffice-commits
mailing list