diff options
author | Matthias Clasen <mclasen@redhat.com> | 2014-12-22 10:52:54 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2014-12-22 10:52:54 -0500 |
commit | 5127136723f3bc5bbf5cccb5dbca39b894841ee3 (patch) | |
tree | a3872997c965c9529a1c54c3ffc80b13c5ce95ba /gtk/gtknotebook.c | |
parent | ea36b7bfb0c01acaaf348e6b42fcb73da0f8a677 (diff) | |
download | gtk+-5127136723f3bc5bbf5cccb5dbca39b894841ee3.tar.gz |
GtkNotebook: Be a bit more safe against cur_page being NULL
https://bugzilla.gnome.org/show_bug.cgi?id=477454
Diffstat (limited to 'gtk/gtknotebook.c')
-rw-r--r-- | gtk/gtknotebook.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index 2635d1c9ec..61ca58022c 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -3241,7 +3241,6 @@ gtk_notebook_button_release (GtkWidget *widget, { GtkNotebook *notebook; GtkNotebookPrivate *priv; - GtkNotebookPage *page; if (event->type != GDK_BUTTON_RELEASE) return FALSE; @@ -3249,10 +3248,9 @@ gtk_notebook_button_release (GtkWidget *widget, notebook = GTK_NOTEBOOK (widget); priv = notebook->priv; - page = priv->cur_page; - if (!priv->during_detach && - page->reorderable && + priv->cur_page && + priv->cur_page->reorderable && event->button == priv->pressed_button) gtk_notebook_stop_reorder (notebook); |