Use g_variant_dup_string for consistency.
authorYusuke Sato <yusukes@chromium.org>
Tue, 12 Jul 2011 05:04:30 +0000 (14:04 +0900)
committerYusuke Sato <yusukes@chromium.org>
Tue, 12 Jul 2011 05:04:30 +0000 (14:04 +0900)
This fix is similar to https://github.com/ibus/ibus/commit/624c4451da2bd171bd8ac53a9b9dd2a4227ef67f .

BUG=None
TEST=None

Review URL: http://codereview.appspot.com/4641101

bus/ibusimpl.c

index 42afeecf491a37a3531b205d94fad1bbd4cc83d1..b6b2441f1f93bf9e4715eee720079f1941f04248 100644 (file)
@@ -2163,7 +2163,7 @@ bus_ibus_impl_load_global_engine_name_from_config (BusIBusImpl *ibus)
     GVariant *variant = ibus_config_get_value (ibus->config, "general", "global_engine");
     gchar *engine_name = NULL;
     if (variant != NULL) {
-        g_variant_get (variant, "s", &engine_name);
+        engine_name = g_variant_dup_string (variant, NULL);
         g_variant_unref (variant);
     }
     return engine_name;