You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
libreoffice/0001-Resolves-rhbz-660342-U...

36 lines
1.2 KiB

From 1b58066892daa9365d23b39d7439fbbe7d562b13 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Wed, 22 Dec 2010 14:18:41 +0000
Subject: [PATCH] Resolves: rhbz#660342 Undo/Redo crash with postits
---
sw/source/core/undo/SwUndoField.cxx | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/sw/source/core/undo/SwUndoField.cxx b/sw/source/core/undo/SwUndoField.cxx
index 6d93bfc..7bb38c3 100644
--- a/sw/source/core/undo/SwUndoField.cxx
+++ b/sw/source/core/undo/SwUndoField.cxx
@@ -87,7 +87,8 @@ SwUndoFieldFromDoc::~SwUndoFieldFromDoc()
void SwUndoFieldFromDoc::Undo( SwUndoIter& )
{
SwTxtFld * pTxtFld = SwDoc::GetTxtFld(GetPosition());
- const SwField * pField = pTxtFld->GetFld().GetFld();
+
+ const SwField * pField = pTxtFld ? pTxtFld->GetFld().GetFld() : NULL;
if (pField)
{
@@ -102,7 +103,7 @@ void SwUndoFieldFromDoc::Undo( SwUndoIter& )
void SwUndoFieldFromDoc::Redo( SwUndoIter& )
{
SwTxtFld * pTxtFld = SwDoc::GetTxtFld(GetPosition());
- const SwField * pField = pTxtFld->GetFld().GetFld();
+ const SwField * pField = pTxtFld ? pTxtFld->GetFld().GetFld() : NULL;
if (pField)
{
--
1.7.3.3