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,6 +17,7 @@ QWaylandLayerShell::QWaylandLayerShell(QtWayland::zwlr_layer_shell_v1 *shell)
QWaylandLayerShell::~QWaylandLayerShell() QWaylandLayerShell::~QWaylandLayerShell()
{ {
if (zwlr_layer_shell_v1_get_version(object()) >= ZWLR_LAYER_SHELL_V1_DESTROY_SINCE_VERSION)
zwlr_layer_shell_v1_destroy(object()); zwlr_layer_shell_v1_destroy(object());
} }