Replaced boost::shared_ptr with std::shared_ptr
[pulseview.git] / pv / prop / binding / deviceoptions.cpp
index 863c19c00a66e2c0e82edadbfee45384366a6331..a1ae6ba71e6fe50531b88286ef221320b6f054e1 100644 (file)
@@ -22,6 +22,8 @@
 
 #include <stdint.h>
 
+#include <QDebug>
+
 #include "deviceoptions.h"
 
 #include <pv/device/devinst.h>
@@ -35,9 +37,9 @@
 using boost::bind;
 using boost::function;
 using boost::optional;
-using boost::shared_ptr;
 using std::make_pair;
 using std::pair;
+using std::shared_ptr;
 using std::string;
 using std::vector;
 
@@ -135,7 +137,11 @@ void DeviceOptions::bind_enum(const QString &name, int key,
        vector< pair<GVariant*, QString> > values;
 
        assert(_dev_inst);
-       assert(gvar_list);
+       if (!gvar_list) {
+               qDebug() << "Config key " << key << " was listed, but no "
+                       "options were given";
+               return;
+       }
 
        g_variant_iter_init (&iter, gvar_list);
        while ((gvar = g_variant_iter_next_value (&iter)))