Properly guard zwlr_layer_shell_v1 destructor request

The destructor request was added in version 3.
This commit is contained in:
Vlad Zahorodnii 2021-04-07 18:38:16 +03:00
parent b4c62f7926
commit f684097c0f

View file

@ -17,7 +17,8 @@ QWaylandLayerShell::QWaylandLayerShell(QtWayland::zwlr_layer_shell_v1 *shell)
QWaylandLayerShell::~QWaylandLayerShell()
{
zwlr_layer_shell_v1_destroy(object());
if (zwlr_layer_shell_v1_get_version(object()) >= ZWLR_LAYER_SHELL_V1_DESTROY_SINCE_VERSION)
zwlr_layer_shell_v1_destroy(object());
}
QWaylandLayerSurface *QWaylandLayerShell::createLayerSurface(QtWaylandClient::QWaylandWindow *window)