[gnome-calendar/wip/pandusonu/week-view] week-view: avoid segfault when scrolling when unmapped
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/wip/pandusonu/week-view] week-view: avoid segfault when scrolling when unmapped
- Date: Wed, 14 Dec 2016 19:00:54 +0000 (UTC)
commit f134da5a1d2410f8851576d5f0fe6618acb75c0b
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Fri Dec 9 14:47:02 2016 -0200
week-view: avoid segfault when scrolling when unmapped
src/views/gcal-week-view.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/views/gcal-week-view.c b/src/views/gcal-week-view.c
index 91108be..6dbee22 100644
--- a/src/views/gcal-week-view.c
+++ b/src/views/gcal-week-view.c
@@ -148,6 +148,9 @@ update_grid_scroll_position (GcalWeekView *self)
if (datetime_compare_date (now, week_start) < 0 || datetime_compare_date (now, week_end) >= 0)
return;
+ if (!gtk_widget_get_mapped (self->scrolled_window))
+ return;
+
vadjustment = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (self->scrolled_window));
minutes = g_date_time_get_hour (now) * 60 + g_date_time_get_minute (now);
page = gtk_adjustment_get_page_size (vadjustment);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]