diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gtk2_in_qt4.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/gtk2_in_qt4.cpp b/src/gtk2_in_qt4.cpp index e23e988..8f15291 100644 --- a/src/gtk2_in_qt4.cpp +++ b/src/gtk2_in_qt4.cpp @@ -125,6 +125,13 @@ suil_wrapper_new(SuilHost* host, gtk_init(NULL, NULL); } + /* Create wrapper implementation. */ + SuilGtk2InQt4Wrapper* const impl = (SuilGtk2InQt4Wrapper*) + malloc(sizeof(SuilGtk2InQt4Wrapper)); + impl->host_widget = NULL; + impl->parent = NULL; + impl->plug = NULL; + /* Set parent widget if given. */ for (unsigned i = 0; i < n_features; ++i) { if (!strcmp((*features)[i]->URI, LV2_UI__parent)) { @@ -132,12 +139,6 @@ suil_wrapper_new(SuilHost* host, } } - /* Create wrapper implementation. */ - SuilGtk2InQt4Wrapper* const impl = (SuilGtk2InQt4Wrapper*) - malloc(sizeof(SuilGtk2InQt4Wrapper)); - impl->host_widget = NULL; - impl->plug = NULL; - SuilWrapper* wrapper = (SuilWrapper*)malloc(sizeof(SuilWrapper)); wrapper->wrap = wrapper_wrap; wrapper->free = wrapper_free; |