forked from AuroraMiddleware/gtk
GtkNotebook: Be a bit more safe against cur_page being NULL
https://bugzilla.gnome.org/show_bug.cgi?id=477454
This commit is contained in:
parent
ea36b7bfb0
commit
5127136723
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user