[Libreoffice-commits] .: sw/source
Caolán McNamara
caolan at kemper.freedesktop.org
Wed Dec 22 07:04:22 PST 2010
sw/source/core/undo/SwUndoField.cxx | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit 1b58066892daa9365d23b39d7439fbbe7d562b13
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Dec 22 14:18:41 2010 +0000
Resolves: rhbz#660342 Undo/Redo crash with postits
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)
{
More information about the Libreoffice-commits
mailing list