[gtk+] scrolledwindow: Make sure gtk_get_current_event_state returned a state
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] scrolledwindow: Make sure gtk_get_current_event_state returned a state
- Date: Thu, 5 Oct 2017 08:18:27 +0000 (UTC)
commit 786d89cd9d8ccb275d7c48b1db73b4e067b6a90d
Author: Timm Bäder <mail baedert org>
Date: Thu Oct 5 10:13:35 2017 +0200
scrolledwindow: Make sure gtk_get_current_event_state returned a state
Technically correct and pleases Coverity.
gtk/gtkscrolledwindow.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index 9d89da1..d73aff5 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -1314,7 +1314,9 @@ scroll_controller_scroll (GtkEventControllerScroll *scroll,
gboolean shifted;
GdkModifierType state;
- gtk_get_current_event_state (&state);
+ if (!gtk_get_current_event_state (&state))
+ return;
+
shifted = (state & GDK_SHIFT_MASK) != 0;
priv = scrolled_window->priv;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]