Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Possibly fix one more crash on Hyprland

Dmitry Kazakovcb1c1decccf9
diff --git a/plugins/platforms/wayland/waylandcolormanagement/KisWaylandAPIImageDescription.cpp b/plugins/platforms/wayland/waylandcolormanagement/KisWaylandAPIImageDescription.cpp
index cf0dacf366..6cf6996137 100644
--- a/plugins/platforms/wayland/waylandcolormanagement/KisWaylandAPIImageDescription.cpp
+++ b/plugins/platforms/wayland/waylandcolormanagement/KisWaylandAPIImageDescription.cpp
@@ -15,7 +15,14 @@ KisWaylandAPIImageDescriptionInfo::KisWaylandAPIImageDescriptionInfo(::wp_image_
}
KisWaylandAPIImageDescriptionInfo::~KisWaylandAPIImageDescriptionInfo()
{
- wp_image_description_info_v1_destroy(object());
+ /**
+ * The description info objects are automatically destroyed on delivering done()
+ * event, so we shouldn't destroy them manually (or it can cause protocol error
+ * on hyprland)
+ */
+ if (!m_isReady) {
+ wp_image_description_info_v1_destroy(object());
+ }
}
void KisWaylandAPIImageDescriptionInfo::wp_image_description_info_v1_done()
{