summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Catanzaro <mcatanzaro@igalia.com>2019-07-03 18:50:49 -0500
committerMichael Catanzaro <mcatanzaro@gnome.org>2020-02-18 23:32:24 +0000
commit020022b42d5762363abcce64f80815d621497d3b (patch)
treec972a43639e791f72be19eadd77ad70deb3cb46f
parent94a9fa2c7f5d593fe4350a18db962af751bf1c20 (diff)
downloadgnome-calendar-mcatanzaro/#299-gnome-3-34.tar.gz
Avoid crashing when year view's weather icon is NULLmcatanzaro/#299-gnome-3-34
This is not a proper solution, because I don't see how it could possibly ever be NULL here. But a huge number of users are reporting this crash, so we have to try something. This fixes #299, but I'm not happy with it.
-rw-r--r--src/views/gcal-year-view.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/views/gcal-year-view.c b/src/views/gcal-year-view.c
index d32bc0d8..5c6ec89c 100644
--- a/src/views/gcal-year-view.c
+++ b/src/views/gcal-year-view.c
@@ -2192,7 +2192,11 @@ update_weather (GcalYearView *self)
if (!updated)
{
gtk_label_set_text (self->temp_label, "");
- gtk_image_clear (self->weather_icon);
+ /* FIXME: This should never be NULL, but it somehow is.
+ * https://gitlab.gnome.org/GNOME/gnome-calendar/issues/299
+ */
+ if (self->weather_icon != NULL)
+ gtk_image_clear (self->weather_icon);
}
}