summaryrefslogtreecommitdiff
path: root/sw/source/ui/docvw
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/docvw')
-rw-r--r--sw/source/ui/docvw/edtwin.cxx2
-rw-r--r--sw/source/ui/docvw/romenu.cxx8
2 files changed, 7 insertions, 3 deletions
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index e2e59e17831e..7b5741316cbb 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -2261,7 +2261,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
BOOL bIsAutoCorrectChar = SvxAutoCorrect::IsAutoCorrectChar( aCh );
- BOOL bRunNext = pACorr->HasRunNext();
+ BOOL bRunNext = pACorr && pACorr->HasRunNext();
if( !aKeyEvent.GetRepeat() && pACorr && ( bIsAutoCorrectChar || bRunNext ) &&
pACfg->IsAutoFmtByInput() &&
(( pACorr->IsAutoCorrFlag( ChgWeightUnderl ) &&
diff --git a/sw/source/ui/docvw/romenu.cxx b/sw/source/ui/docvw/romenu.cxx
index f793a7f854b7..c93409441be9 100644
--- a/sw/source/ui/docvw/romenu.cxx
+++ b/sw/source/ui/docvw/romenu.cxx
@@ -238,9 +238,13 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
EnableItem( MN_READONLY_COPY, FALSE );
eState = pVFrame->GetBindings().QueryState( SID_EDITDOC, pState );
- if(eState < SFX_ITEM_DEFAULT ||
- rSh.IsGlobalDoc() && rView.GetDocShell()->IsReadOnlyUI())
+ if (
+ eState < SFX_ITEM_DEFAULT ||
+ (rSh.IsGlobalDoc() && rView.GetDocShell()->IsReadOnlyUI())
+ )
+ {
EnableItem( MN_READONLY_EDITDOC, FALSE );
+ }
if ( !sURL.Len() )
{