[gnome-text-editor] window: check for page range before calling getter
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-text-editor] window: check for page range before calling getter
- Date: Tue, 22 Jun 2021 21:19:08 +0000 (UTC)
commit 2a95d940c5da57265e9d8d58cf8b93cb1d292ceb
Author: Christian Hergert <chergert redhat com>
Date: Tue Jun 22 14:14:24 2021 -0700
window: check for page range before calling getter
src/editor-window-actions.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/editor-window-actions.c b/src/editor-window-actions.c
index f81c87d..660beee 100644
--- a/src/editor-window-actions.c
+++ b/src/editor-window-actions.c
@@ -274,7 +274,7 @@ editor_window_actions_change_page_cb (GtkWidget *widget,
g_assert (g_variant_is_of_type (param, G_VARIANT_TYPE_INT32));
page_num = g_variant_get_int32 (param) - 1;
- if (page_num < 0)
+ if (page_num < 0 || page_num >= editor_window_get_n_pages (self))
return;
if ((page = editor_window_get_nth_page (self, page_num)))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]