[gnome-software/wip/kalev/app-row-unreveal-crash] app row: Avoid emitting "unrevealed" signal when in destruction
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/kalev/app-row-unreveal-crash] app row: Avoid emitting "unrevealed" signal when in destruction
- Date: Tue, 13 Oct 2020 14:59:29 +0000 (UTC)
commit f7c62ccf12977357ed0ff09c9eaf5873f0ee5035
Author: Kalev Lember <klember redhat com>
Date: Tue Oct 13 16:46:11 2020 +0200
app row: Avoid emitting "unrevealed" signal when in destruction
This avoids a crash when the unreveal animation races with GsUpdatesPage
reload. See https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1016#note_932622
for analysis of the exact sequence of events to trigger this.
Fixes: https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1016
src/gs-app-row.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/src/gs-app-row.c b/src/gs-app-row.c
index 721d729b..36acd206 100644
--- a/src/gs-app-row.c
+++ b/src/gs-app-row.c
@@ -465,6 +465,11 @@ static void
child_unrevealed (GObject *revealer, GParamSpec *pspec, gpointer user_data)
{
GsAppRow *app_row = user_data;
+ GsAppRowPrivate *priv = gs_app_row_get_instance_private (app_row);
+
+ /* return immediately if we are in destruction */
+ if (priv->app == NULL)
+ return;
g_signal_emit (app_row, signals[SIGNAL_UNREVEALED], 0);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]