- g_variant_unref(options[0].def);
- g_slist_free_full(options[0].values, (GDestroyNotify)g_variant_unref);
+ if (options[0].def) {
+ g_variant_unref(options[0].def);
+ options[0].def = NULL;
+ }
+ if (options[0].values) {
+ g_slist_free_full(options[0].values, (GDestroyNotify)g_variant_unref);
+ options[0].values = NULL;
+ }