]> spindle.queued.net Git - midori/commitdiff
Skip non-strings when loading or saving search engines
authorArnaud Renevier <arenevier@fdn.fr>
Sat, 18 Oct 2008 20:07:18 +0000 (22:07 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sat, 18 Oct 2008 20:08:51 +0000 (22:08 +0200)
midori/main.c

index ff535489e2a3a142bdbe30efdeeebc73cd8d51c2..6f00cf3a36e83c31f9517fad2a71196d20fe5ce3 100644 (file)
@@ -305,6 +305,8 @@ search_engines_new_from_file (const gchar* filename,
         item = katze_item_new ();
         for (j = 0; j < n_properties; j++)
         {
+            if (!G_IS_PARAM_SPEC_STRING (pspecs[j]))
+                continue;
             property = g_param_spec_get_name (pspecs[j]);
             value = g_key_file_get_string (key_file, engines[i],
                                           property, NULL);
@@ -342,6 +344,8 @@ search_engines_save_to_file (KatzeArray*  search_engines,
         name = katze_item_get_name (item);
         for (j = 0; j < n_properties; j++)
         {
+            if (!G_IS_PARAM_SPEC_STRING (pspecs[j]))
+                continue;
             property = g_param_spec_get_name (pspecs[j]);
             g_object_get (item, property, &value, NULL);
             if (value)