diff options
author | Michael Catanzaro <mcatanzaro@igalia.com> | 2019-07-03 18:50:49 -0500 |
---|---|---|
committer | Michael Catanzaro <mcatanzaro@gnome.org> | 2020-02-18 23:32:04 +0000 |
commit | 449084d96ab3267cfdebf3a22c99ade6fda96dda (patch) | |
tree | 7add5f75d5b425dfe3dcb5cba610d758587a234b | |
parent | a439fd2b1de69dd2302ff1d224ff3f064bacfb2c (diff) | |
download | gnome-calendar-mcatanzaro/#299.tar.gz |
Avoid crashing when year view's weather icon is NULLmcatanzaro/#299
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.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/views/gcal-year-view.c b/src/views/gcal-year-view.c index 0a264f94..fe30b733 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); } } |