1d9d2be
From a636847bdeda428aa2b669b6cd90f6c7f8232f9c Mon Sep 17 00:00:00 2001
1d9d2be
From: Michael Stahl <mstahl@redhat.com>
1d9d2be
Date: Fri, 4 Jan 2013 22:27:22 +0100
1d9d2be
Subject: [PATCH] rhbz#890080: crash in SwXTextDocument::getRendererCount
1d9d2be
1d9d2be
No idea how to reproduce it; pSwView is checked before use except here.
1d9d2be
(possibly regression from 2f9f480b22f2fff59d9c48b4b46706c3d5223e66)
1d9d2be
1d9d2be
Change-Id: Ia7667e879a6944e084a45c06133efc1ac2d8b3c0
1d9d2be
(cherry picked from commit 1c52268a5bc6d79c6ee1344e4e341c7e3820d4e0)
1d9d2be
---
1d9d2be
 sw/source/ui/uno/unotxdoc.cxx | 5 ++++-
1d9d2be
 1 file changed, 4 insertions(+), 1 deletion(-)
1d9d2be
1d9d2be
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
1d9d2be
index 8711d4e..8fb89db 100644
1d9d2be
--- a/sw/source/ui/uno/unotxdoc.cxx
1d9d2be
+++ b/sw/source/ui/uno/unotxdoc.cxx
1d9d2be
@@ -2554,7 +2554,10 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount(
1d9d2be
                 SwViewOption aOpt( *pViewShell->GetViewOptions() );
1d9d2be
                 aOpt.setBrowseMode( false );
1d9d2be
                 pViewShell->ApplyViewOptions( aOpt );
1d9d2be
-                pSwView->RecheckBrowseMode();
1d9d2be
+                if (pSwView)
1d9d2be
+                {
1d9d2be
+                    pSwView->RecheckBrowseMode();
1d9d2be
+                }
1d9d2be
             }
1d9d2be
 
1d9d2be
             // reformating the document for printing will show the changes in the view
1d9d2be
-- 
1d9d2be
1.7.11.7
1d9d2be