GVariant *tuple, *rational[2];
GVariantBuilder gvb;
unsigned int i;
- struct dev_context *devc = sdi->priv;
+ struct dev_context *devc;
switch (key) {
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_builder_end(&gvb);
break;
case SR_CONF_TRIGGER_SOURCE:
+ if (!sdi || !sdi->priv)
+ /* Can't know this until we have the exact model. */
+ return SR_ERR_ARG;
+ devc = sdi->priv;
*data = g_variant_new_strv(trigger_sources,
devc->has_digital ? ARRAY_SIZE(trigger_sources) : 4);
break;