[gtk+] GtkNotebook: Be a bit more safe against cur_page being NULL
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkNotebook: Be a bit more safe against cur_page being NULL
- Date: Mon, 22 Dec 2014 16:25:42 +0000 (UTC)
commit 5127136723f3bc5bbf5cccb5dbca39b894841ee3
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Dec 22 10:52:54 2014 -0500
GtkNotebook: Be a bit more safe against cur_page being NULL
https://bugzilla.gnome.org/show_bug.cgi?id=477454
gtk/gtknotebook.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 2635d1c..61ca580 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]