writerperfect/source/filter/OdtGenerator.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit a93b298808635b2571f1e506a42fa1df0f2598c0
Author: Fridrich Å trba <[email protected]>
Date:   Tue Sep 20 14:54:43 2011 +0200

    A bit more defensive programming

diff --git a/writerperfect/source/filter/OdtGenerator.cxx 
b/writerperfect/source/filter/OdtGenerator.cxx
index 1e64a3b..8c12e6f 100644
--- a/writerperfect/source/filter/OdtGenerator.cxx
+++ b/writerperfect/source/filter/OdtGenerator.cxx
@@ -797,7 +797,7 @@ void OdtGenerator::defineOrderedListLevel(const 
WPXPropertyList &propList)
     // and reach those levels. See gradguide0405_PC.wpd in the regression suite
     for (std::vector<ListStyle *>::iterator iterOrderedListStyles = 
mpImpl->mListStyles.begin(); iterOrderedListStyles != 
mpImpl->mListStyles.end(); ++iterOrderedListStyles)
     {
-        if ((* iterOrderedListStyles)->getListID() == id)
+        if ((* iterOrderedListStyles) && (* 
iterOrderedListStyles)->getListID() == id && propList["libwpd:level"])
             (* 
iterOrderedListStyles)->updateListLevel((propList["libwpd:level"]->getInt() - 
1), propList);
     }
 }
@@ -825,7 +825,7 @@ void OdtGenerator::defineUnorderedListLevel(const 
WPXPropertyList &propList)
     // See comment in OdtGenerator::defineOrderedListLevel
     for (std::vector<ListStyle *>::iterator iterUnorderedListStyles = 
mpImpl->mListStyles.begin(); iterUnorderedListStyles != 
mpImpl->mListStyles.end(); ++iterUnorderedListStyles)
     {
-        if ((* iterUnorderedListStyles)->getListID() == id)
+        if ((* iterUnorderedListStyles) && (* 
iterUnorderedListStyles)->getListID() == id && propList["libwpd:level"])
             (* 
iterUnorderedListStyles)->updateListLevel((propList["libwpd:level"]->getInt() - 
1), propList);
     }
 }
_______________________________________________
Libreoffice-commits mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to