Client: Reset wl_egl_window before wl_surface
Semantically we want things in this order as wl_egl_window_create takes a reference to the wl_surface. Teardown typically is the opposite of construction. This brings us in line with GTK which also tears down in this order. This fixes a repeatable crash when using Nvidia's EGLStreams and closing a window. Change-Id: I356dfbba9a7315717c8ecdc7023ca7b047622697 Reviewed-by: Frederik Gladhorn <gladhorn@kde.org> Reviewed-by: Johan Helsing <johanhelsing@gmail.com>
This commit is contained in:
parent
377871d8e5
commit
85f4f2827b
@ -244,6 +244,8 @@ void QWaylandWindow::reset(bool sendDestroyEvent)
|
||||
mShellSurface = nullptr;
|
||||
delete mSubSurfaceWindow;
|
||||
mSubSurfaceWindow = nullptr;
|
||||
|
||||
invalidateSurface();
|
||||
if (mSurface) {
|
||||
emit wlSurfaceDestroyed();
|
||||
QWriteLocker lock(&mSurfaceLock);
|
||||
|
Loading…
x
Reference in New Issue
Block a user