X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=bindings%2Fcxx%2Fclasses.cpp;h=5e07c2c6f8744ad32ea0e388497bb851e2b536f2;hb=39fcfdc9dae5311617f0e72b0a7333a199620190;hp=cfc2dafbfa4b10d32cf5d6ac9ace9f395b0f4121;hpb=116670b15d1facd756cb97525b3fea51d11d28a4;p=libsigrok.git diff --git a/bindings/cxx/classes.cpp b/bindings/cxx/classes.cpp index cfc2dafb..5e07c2c6 100644 --- a/bindings/cxx/classes.cpp +++ b/bindings/cxx/classes.cpp @@ -509,10 +509,11 @@ set Configurable::config_keys() const opts = sr_dev_options(config_driver, config_sdi, config_channel_group); - for (guint i = 0; i < opts->len; i++) - result.insert(ConfigKey::get(g_array_index(opts, uint32_t, i))); - - g_array_free(opts, TRUE); + if (opts) { + for (guint i = 0; i < opts->len; i++) + result.insert(ConfigKey::get(g_array_index(opts, uint32_t, i))); + g_array_free(opts, TRUE); + } return result; } @@ -1328,6 +1329,11 @@ void Input::end() check(sr_input_end(_structure)); } +void Input::reset() +{ + check(sr_input_reset(_structure)); +} + Input::~Input() { sr_input_free(_structure);