4820fc2
From 48f4f5f4283cb9a58223c6cc6f4d0ebadce53722 Mon Sep 17 00:00:00 2001
4820fc2
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
4820fc2
Date: Wed, 2 Feb 2011 16:05:01 +0000
4820fc2
Subject: [PATCH] Resolves: rhbz#670020 crash in slidesorting
4820fc2
4820fc2
---
4820fc2
 sd/source/ui/view/drviews1.cxx |    3 +++
4820fc2
 1 files changed, 3 insertions(+), 0 deletions(-)
4820fc2
4820fc2
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
4820fc2
index d1acb96..e0b220e 100644
4820fc2
--- a/sd/source/ui/view/drviews1.cxx
4820fc2
+++ b/sd/source/ui/view/drviews1.cxx
4820fc2
@@ -712,6 +712,9 @@ SdPage* DrawViewShell::getCurrentPage() const
4820fc2
 
4820fc2
 void DrawViewShell::ResetActualPage()
4820fc2
 {
4820fc2
+    if (!GetDoc())
4820fc2
+        return;
4820fc2
+
4820fc2
     USHORT nCurrentPage = maTabControl.GetCurPageId() - 1;
4820fc2
     USHORT nPageCount	= (meEditMode == EM_PAGE)?GetDoc()->GetSdPageCount(mePageKind):GetDoc()->GetMasterSdPageCount(mePageKind);
4820fc2
     if (nPageCount > 0)
4820fc2
-- 
4820fc2
1.7.4
4820fc2