X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fprop%2Fbinding%2Fdecoderoptions.cpp;fp=pv%2Fprop%2Fbinding%2Fdecoderoptions.cpp;h=361d85b2bbbbec202638b28b67675ce4d7fff934;hb=615f6d25e4144ca6db2d60fe52deacef117c2151;hp=34f1b813a6478012ceec15eaa7f6d704784ab525;hpb=903038a8c9496b23d29535dd8c41a6c207c0831b;p=pulseview.git diff --git a/pv/prop/binding/decoderoptions.cpp b/pv/prop/binding/decoderoptions.cpp index 34f1b81..361d85b 100644 --- a/pv/prop/binding/decoderoptions.cpp +++ b/pv/prop/binding/decoderoptions.cpp @@ -78,13 +78,17 @@ DecoderOptions::DecoderOptions( GVariant* DecoderOptions::getter(const char *id) { + GVariant *val = NULL; + assert(_decoder); // Get the value from the hash table if it is already present - GVariant *val = (GVariant*)g_hash_table_lookup( - (GHashTable*)_decoder->options(), id); + const map& options = _decoder->options(); + map::const_iterator iter = options.find(id); - if (!val) + if (iter != options.end()) + val = (*iter).second; + else { assert(_decoder->decoder());