From f2d488dea1a4ac233b11779dfea645e8d7276fda Mon Sep 17 00:00:00 2001 From: Juan Pablo Ugarte Date: Fri, 25 Apr 2014 19:18:28 -0300 Subject: [PATCH] Fixed crash in GtkLockButton if a button with permission set to NULL is clicked. https://bugzilla.gnome.org/show_bug.cgi?id=728992 --- gtk/gtklockbutton.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gtk/gtklockbutton.c b/gtk/gtklockbutton.c index 6b051d1be1..d0c973b8ef 100644 --- a/gtk/gtklockbutton.c +++ b/gtk/gtklockbutton.c @@ -451,8 +451,10 @@ gtk_lock_button_clicked (GtkButton *button) { GtkLockButtonPrivate *priv = GTK_LOCK_BUTTON (button)->priv; - /* if we already have a pending interactive check, then do nothing */ - if (priv->cancellable != NULL) + /* if we already have a pending interactive check or permission is not set, + * then do nothing + */ + if (priv->cancellable != NULL || priv->permission == NULL) return; if (g_permission_get_allowed (priv->permission))