Code

fix crash, report warnings instead. trying to find real cause for this (crash on...
authorjohanengelen <johanengelen@users.sourceforge.net>
Mon, 2 Jun 2008 20:01:04 +0000 (20:01 +0000)
committerjohanengelen <johanengelen@users.sourceforge.net>
Mon, 2 Jun 2008 20:01:04 +0000 (20:01 +0000)
src/sp-lpe-item.cpp

index bf9828b15d4433752ef35d4bfeefb774ab745ca3..dce9429348dad46d2e03623e9815f016a1ff8f6f 100644 (file)
@@ -277,6 +277,14 @@ void sp_lpe_item_perform_path_effect(SPLPEItem *lpeitem, SPCurve *curve) {
         for (PathEffectList::iterator it = lpeitem->path_effect_list->begin(); it != lpeitem->path_effect_list->end(); ++it)
         {
             LivePathEffectObject *lpeobj = (*it)->lpeobject;
+            if (!lpeobj) {
+                g_warning("sp_lpe_item_perform_path_effect - NULL lpeobj in list!");
+                return;
+            }
+            if (!lpeobj->lpe) {
+                g_warning("sp_lpe_item_perform_path_effect - lpeobj without lpe!");
+                return;
+            }
 
             if (lpeobj->lpe->isVisible()) {
                 // Groups have their doBeforeEffect called elsewhere