From: Stefan BrĂ¼ns Date: Sat, 28 Nov 2015 22:18:50 +0000 (+0100) Subject: bindings/cxx: make sure the config value reference is kept X-Git-Tag: libsigrok-0.4.0~79 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=7cccc9155c6cdca46deee310be112eb23b374c3b;p=libsigrok.git bindings/cxx: make sure the config value reference is kept fixes glib warning: GLib-CRITICAL **: g_variant_unref: assertion 'value->ref_count > 0' failed --- diff --git a/bindings/cxx/classes.cpp b/bindings/cxx/classes.cpp index 5cab6ac9..5eb3a750 100644 --- a/bindings/cxx/classes.cpp +++ b/bindings/cxx/classes.cpp @@ -1140,7 +1140,7 @@ map Meta::config() const map result; for (auto l = _structure->config; l; l = l->next) { auto *const config = static_cast(l->data); - result[ConfigKey::get(config->key)] = Glib::VariantBase(config->data); + result[ConfigKey::get(config->key)] = Glib::VariantBase(config->data, true); } return result; }