diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/x11_in_gtk2.c | 7 | ||||
-rw-r--r-- | src/x11_in_qt4.cpp | 7 |
2 files changed, 8 insertions, 6 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; } diff --git a/src/x11_in_qt4.cpp b/src/x11_in_qt4.cpp index e407ccc..23eae5e 100644 --- a/src/x11_in_qt4.cpp +++ b/src/x11_in_qt4.cpp @@ -54,14 +54,15 @@ suil_wrapper_new(SuilHost* host, wrapper->impl = ew; 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)ew->winId(); - wrapper->features[n_features] = parent_feature; + wrapper->features[n_features] = parent_feature; + wrapper->features[n_features + 1] = NULL; return wrapper; } |