summaryrefslogtreecommitdiffstats
path: root/src/x11_in_gtk2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/x11_in_gtk2.c')
-rw-r--r--src/x11_in_gtk2.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/x11_in_gtk2.c b/src/x11_in_gtk2.c
index 0fae7a5..4ef06c9 100644
--- a/src/x11_in_gtk2.c
+++ b/src/x11_in_gtk2.c
@@ -115,14 +115,15 @@ suil_wrapper_new(SuilHost* host,
wrapper->impl = wrap;
wrapper->features = (LV2_Feature**)malloc(
- sizeof(LV2_Feature) * (n_features + 1));
- memcpy(wrapper->features, features, sizeof(LV2_Feature) * n_features);
+ sizeof(LV2_Feature*) * (n_features + 2));
+ memcpy(wrapper->features, features, sizeof(LV2_Feature*) * n_features);
LV2_Feature* parent_feature = (LV2_Feature*)malloc(sizeof(LV2_Feature));
parent_feature->URI = NS_UI "parent";
parent_feature->data = (void*)(intptr_t)gtk_plug_get_id(wrap->plug);
- wrapper->features[n_features] = parent_feature;
+ wrapper->features[n_features] = parent_feature;
+ wrapper->features[n_features + 1] = NULL;
return wrapper;
}