Reset mFrameCallback in destruction
Otherwise we crash if we call reset twice. For example if we call setParent and setVisible together. Change-Id: I7f07825167bf8c3236a80e649a6d6805fd6c868b Reviewed-by: Johan Helsing <johan.helsing@qt.io>
This commit is contained in:
parent
7a41c0171c
commit
6a1f52c90d
@ -249,8 +249,10 @@ void QWaylandWindow::reset()
|
|||||||
if (isInitialized())
|
if (isInitialized())
|
||||||
destroy();
|
destroy();
|
||||||
|
|
||||||
if (mFrameCallback)
|
if (mFrameCallback) {
|
||||||
wl_callback_destroy(mFrameCallback);
|
wl_callback_destroy(mFrameCallback);
|
||||||
|
mFrameCallback = nullptr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QWaylandWindow *QWaylandWindow::fromWlSurface(::wl_surface *surface)
|
QWaylandWindow *QWaylandWindow::fromWlSurface(::wl_surface *surface)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user