[dconf] editor: Don't crash on empty schema descriptions



commit 73a263d710d3b629c1af4fb1e112671e494ee79d
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun May 8 18:23:11 2011 +0200

    editor: Don't crash on empty schema descriptions
    
    Based on a patch from Fabian Deutsch <fabian deutsch gmx de>

 editor/dconf-schema.vala |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/editor/dconf-schema.vala b/editor/dconf-schema.vala
index c2654b5..2d3ff7d 100644
--- a/editor/dconf-schema.vala
+++ b/editor/dconf-schema.vala
@@ -52,9 +52,9 @@ public class SchemaKey
                 }
             }
             else if (child->name == "summary")
-                summary = child->children->content;
+                summary = child->children == null ? "" : child->children->content;
             else if (child->name == "description")
-                description = child->children->content;
+                description = child->children == null ? "" : child->children->content;
             else if (child->name == "range")
                 range = new SchemaValueRange.from_xml(type, child);
             else if (child->name == "choices")



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