[dia] svg: closed-by-style was too greedy



commit 98d46025076759bba6048ee4580aa7b1c1816976
Author: Hans Breuer <hans breuer org>
Date:   Sat Sep 14 11:15:33 2013 +0200

    svg: closed-by-style was too greedy
    
    actually this should have been crashing (comparing NULL, to "none"

 plug-ins/svg/svg-import.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/plug-ins/svg/svg-import.c b/plug-ins/svg/svg-import.c
index 6b57c56..0d20c52 100644
--- a/plug-ins/svg/svg-import.c
+++ b/plug-ins/svg/svg-import.c
@@ -510,6 +510,8 @@ _node_closed_by_style (xmlNodePtr node, DiaSvgStyle *parent_style)
   if (parent_style && parent_style->fill > 0 && !xmlHasProp (node, (const xmlChar *)"fill"))
     return TRUE;
   str = xmlGetProp (node, (const xmlChar *)"fill");
+  if (!str)
+    return FALSE;
   closed = xmlStrcmp(str, (const xmlChar *)"none") != 0;
   xmlFree (str);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]