]> sigrok.org Git - pulseview.git/commitdiff
Enum: Reference gvariants in the values list
authorJoel Holdsworth <redacted>
Tue, 11 Mar 2014 23:17:45 +0000 (00:17 +0100)
committerJoel Holdsworth <redacted>
Thu, 13 Mar 2014 17:00:33 +0000 (17:00 +0000)
pv/prop/enum.cpp

index 71cd431548da771ff5e3a9289480f62c5d5b71d2..6439a725c7adbdca16d90865c622da719fe9ef3b 100644 (file)
@@ -37,6 +37,9 @@ Enum::Enum(QString name,
        _values(values),
        _selector(NULL)
 {
+       for (vector< pair<GVariant*, QString> >::const_iterator i =
+               _values.begin(); i != _values.end(); i++)
+               g_variant_ref((*i).first);
 }
 
 Enum::~Enum()