From 80c744d6e621fdd2a1080a66169144db5436f139 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 22 Dec 2010 14:21:57 +0000 Subject: [PATCH] Resolves: rhbz#660342 Undo/Redo crash with postits --- ...-660342-Undo-Redo-crash-with-postits.patch | 35 +++++++++++++++++++ libreoffice.spec | 3 ++ 2 files changed, 38 insertions(+) create mode 100644 0001-Resolves-rhbz-660342-Undo-Redo-crash-with-postits.patch diff --git a/0001-Resolves-rhbz-660342-Undo-Redo-crash-with-postits.patch b/0001-Resolves-rhbz-660342-Undo-Redo-crash-with-postits.patch new file mode 100644 index 0000000..07e069e --- /dev/null +++ b/0001-Resolves-rhbz-660342-Undo-Redo-crash-with-postits.patch @@ -0,0 +1,35 @@ +From 1b58066892daa9365d23b39d7439fbbe7d562b13 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +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 + diff --git a/libreoffice.spec b/libreoffice.spec index 8c3b40c..a97f84b 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -96,6 +96,7 @@ Patch13: libreoffice-installfix.patch Patch14: 0001-tidy-this-up-and-don-t-bail-out-on-mislength-records.patch Patch15: 0001-Resoves-rhbz-663857-font-color-missing-C-FAQ-10.3-do.patch Patch16: fdo32572-sc-dont-double-paste.patch +Patch17: 0001-Resolves-rhbz-660342-Undo-Redo-crash-with-postits.patch %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %define instdir %{_libdir} @@ -707,6 +708,7 @@ mv -f redhat.soc extras/source/palettes/standard.soc %patch14 -p1 -b .don-t-bail-out-on-mislength-records.patch %patch15 -p1 -b .font-color-missing-C-FAQ-10.3-do.patch %patch16 -p1 -b .fdo32572-sc-dont-double-paste.patch +%patch17 -p1 -b .rhbz-660342-Undo-Redo-crash-with-postits.patch touch scripting/source/pyprov/delzip touch scripting/util/provider/beanshell/delzip touch scripting/util/provider/javascript/delzip @@ -2010,6 +2012,7 @@ update-desktop-database %{_datadir}/applications &> /dev/null || : %changelog * Wed Dec 22 2010 Caolán McNamara 3.3.0.2-2 - Resolves: rhbz#663724 fdo32572-sc-dont-double-paste.patch +- Resolves: rhbz#660342 Undo/Redo crash with postits * Tue Dec 21 2010 Caolán McNamara 3.3.0.2-1 - latest version