[glib] Don't crash gsettings-schema-convert for GConf schemas that contain empty elements
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Don't crash gsettings-schema-convert for GConf schemas that contain empty elements
- Date: Tue, 20 Apr 2010 21:29:59 +0000 (UTC)
commit 9717833e8200929f908fa682262fcfda8f964653
Author: Richard Hughes <richard hughsie com>
Date: Tue Apr 20 22:25:23 2010 +0100
Don't crash gsettings-schema-convert for GConf schemas that contain empty elements
This can be observed in gnome-power-manager with one of the entries that
contains <long></long>
gio/gsettings-schema-convert | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gio/gsettings-schema-convert b/gio/gsettings-schema-convert
index ff1127c..dcc4bef 100755
--- a/gio/gsettings-schema-convert
+++ b/gio/gsettings-schema-convert
@@ -792,8 +792,10 @@ class GConfSchema:
self.short = self._get_value_with_locale(node, locale_node, 'short')
self.long = self._get_value_with_locale(node, locale_node, 'long')
- self.short = self._oneline(self.short)
- self.long = self._oneline(self.long)
+ if self.short:
+ self.short = self._oneline(self.short)
+ if self.long:
+ self.long = self._oneline(self.long)
# Fix the default to be parsable by GVariant
if self.type == 'string':
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]