summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark McLoughlin <mark@skynet.ie>2004-08-25 21:20:54 +0000
committerMark McLoughlin <markmc@src.gnome.org>2004-08-25 21:20:54 +0000
commit6b81ba40df89a60e99dfe172e8ede2da847a81a4 (patch)
tree0d01ea509ce5f5fd497570faa25222273dfc2255
parent41fa1c80d90182580fd09c769a5cbd8a979c8035 (diff)
downloadgconf-6b81ba40df89a60e99dfe172e8ede2da847a81a4.tar.gz
don't abort if we find no local schema to match any locales - there may
2004-08-25 Mark McLoughlin <mark@skynet.ie> * backends/markup-tree.c: (markup_entry_get_value): don't abort if we find no local schema to match any locales - there may not be a "C" local schema at all. See bug #147522 for a test case from Caio Begotti <caio1982@gmail.com >
-rw-r--r--ChangeLog7
-rw-r--r--backends/markup-tree.c10
2 files changed, 11 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 40655ee1..6b7ea92a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-08-25 Mark McLoughlin <mark@skynet.ie>
+
+ * backends/markup-tree.c: (markup_entry_get_value): don't
+ abort if we find no local schema to match any locales - there
+ may not be a "C" local schema at all. See bug #147522 for a
+ test case from Caio Begotti <caio1982@gmail.com >
+
2004-08-19 J.H.M. Dassen (Ray) <jdassen@debian.org>
Backport from HEAD:
diff --git a/backends/markup-tree.c b/backends/markup-tree.c
index 942487c3..c2c69685 100644
--- a/backends/markup-tree.c
+++ b/backends/markup-tree.c
@@ -1500,24 +1500,22 @@ markup_entry_get_value (MarkupEntry *entry,
* fall back to C locale if we can
*/
- g_assert (best != NULL);
-
- if (best->locale)
+ if (best && best->locale)
gconf_schema_set_locale (schema, best->locale);
else
gconf_schema_set_locale (schema, "C");
- if (best->default_value)
+ if (best && best->default_value)
gconf_schema_set_default_value (schema, best->default_value);
else if (c_local_schema && c_local_schema->default_value)
gconf_schema_set_default_value (schema, c_local_schema->default_value);
- if (best->short_desc)
+ if (best && best->short_desc)
gconf_schema_set_short_desc (schema, best->short_desc);
else if (c_local_schema && c_local_schema->short_desc)
gconf_schema_set_short_desc (schema, c_local_schema->short_desc);
- if (best->long_desc)
+ if (best && best->long_desc)
gconf_schema_set_long_desc (schema, best->long_desc);
else if (c_local_schema && c_local_schema->long_desc)
gconf_schema_set_long_desc (schema, c_local_schema->long_desc);