summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Mestnik <[email protected]>2026-05-19 07:57:50 -0400
committerVictor Kareh <[email protected]>2026-06-04 17:17:12 -0400
commitc6e8d213b702d397363d7f9ada30fef52eafb91b (patch)
treedeb9038b25c6a892d0f3323c897278c291da4247
parent3172eaf2dfa1c00739b15c9d8a017762dfb9a82c (diff)
downloadmate-panel-c6e8d213b702d397363d7f9ada30fef52eafb91b.tar.bz2
mate-panel-c6e8d213b702d397363d7f9ada30fef52eafb91b.tar.xz
panel-applet-frame-dbus: fix crash when applet is removed during background updateHEADmaster
Cancel any pending background operation when the applet frame is destroyed, and avoid accessing the frame in the callback if the operation was cancelled or failed. Fixes #1557
-rw-r--r--mate-panel/libmate-panel-applet-private/panel-applet-frame-dbus.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/mate-panel/libmate-panel-applet-private/panel-applet-frame-dbus.c b/mate-panel/libmate-panel-applet-private/panel-applet-frame-dbus.c
index a11d43f4..3ef72b1d 100644
--- a/mate-panel/libmate-panel-applet-private/panel-applet-frame-dbus.c
+++ b/mate-panel/libmate-panel-applet-private/panel-applet-frame-dbus.c
@@ -231,8 +231,14 @@ container_child_background_set (GObject *source_object,
{
MatePanelAppletContainer *container = MATE_PANEL_APPLET_CONTAINER (source_object);
MatePanelAppletFrameDBus *frame = MATE_PANEL_APPLET_FRAME_DBUS (user_data);
+ GError *error = NULL;
+
+ mate_panel_applet_container_child_set_finish (container, res, &error);
- mate_panel_applet_container_child_set_finish (container, res, NULL);
+ if (error) {
+ g_error_free (error);
+ return;
+ }
frame->priv->bg_operation = NULL;
}
@@ -327,6 +333,8 @@ mate_panel_applet_frame_dbus_finalize (GObject *object)
{
MatePanelAppletFrameDBus *frame = MATE_PANEL_APPLET_FRAME_DBUS (object);
+ if (frame->priv->bg_operation)
+ mate_panel_applet_container_cancel_operation (frame->priv->container, frame->priv->bg_operation);
frame->priv->bg_operation = NULL;
G_OBJECT_CLASS (mate_panel_applet_frame_dbus_parent_class)->finalize (object);