[Libreoffice-commits] .: sw/source

Caolán McNamara caolan at kemper.freedesktop.org
Wed Dec 22 12:51:33 PST 2010


 sw/source/ui/app/swmodul1.cxx |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit c5baafaf096b3e6eb738cae978378deb87625826
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Dec 22 20:50:49 2010 +0000

    Resolves: #i113655# rhbz#621277 crash with missing DocShell

diff --git a/sw/source/ui/app/swmodul1.cxx b/sw/source/ui/app/swmodul1.cxx
index 7cb6513..c5aed44 100644
--- a/sw/source/ui/app/swmodul1.cxx
+++ b/sw/source/ui/app/swmodul1.cxx
@@ -194,7 +194,12 @@ void SwModule::ApplyUsrPref(const SwViewOption &rUsrPref, SwView* pActView,
         return;
 
     // Weitergabe an die CORE
-    const sal_Bool bReadonly = pCurrView->GetDocShell()->IsReadOnly();
+    sal_Bool bReadonly;
+    const SwDocShell* pDocSh = pCurrView->GetDocShell();
+    if (pDocSh)
+        bReadonly = pDocSh->IsReadOnly();
+    else //Use existing option if DocShell missing
+        bReadonly = pSh->GetViewOptions()->IsReadonly();
     SwViewOption* pViewOpt;
     if(!bViewOnly)
         pViewOpt = new SwViewOption( *pPref );


More information about the Libreoffice-commits mailing list