Fix crash

Signed-off-by: Slendi <slendi@socopon.com>
This commit is contained in:
2025-10-10 17:25:42 +03:00
parent c4e13985ed
commit d5af4c9baf
4 changed files with 35 additions and 2 deletions

View File

@@ -146,6 +146,10 @@ App::~App()
if (m_sfd != -1)
close(m_sfd);
for (auto &[_, tex] : m_textures) {
UnloadTexture(tex);
}
destroy_layer_surface();
if (m_gl.edpy != EGL_NO_DISPLAY) {
@@ -597,7 +601,12 @@ auto App::init_wayland() -> void
if (!ctx->data.empty())
ctx->app->m_clipboard_cache
= std::move(ctx->data);
wl_data_offer_destroy(ctx->offer);
if (ctx->offer
== ctx->app->m_wayland.curr_offer) {
wl_data_offer_destroy(ctx->offer);
ctx->app->m_wayland.curr_offer
= nullptr;
}
delete ctx;
return G_SOURCE_REMOVE;
},