Properly drop the refcount of the ComponentWindow

Otherwise the ComponentWindow is leak, and so the QWidget is not destroyed
when it should be
This commit is contained in:
Olivier Goffart 2021-03-24 09:26:42 +01:00
parent bb44671cd9
commit 0985318e3e

View file

@ -524,8 +524,10 @@ public:
{
cbindgen_private::ComponentWindowOpaque win;
cbindgen_private::sixtyfps_interpreter_component_instance_window(inner(), &win);
return reinterpret_cast<QWidget *>(cbindgen_private::sixtyfps_qt_get_widget(
auto wid = reinterpret_cast<QWidget *>(cbindgen_private::sixtyfps_qt_get_widget(
reinterpret_cast<cbindgen_private::ComponentWindow *>(&win)));
cbindgen_private::sixtyfps_component_window_drop(&win);
return wid;
}
#endif