diff options
author | Juan Pablo Ugarte <juanpablougarte@gmail.com> | 2014-04-25 19:18:28 -0300 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2014-04-25 22:13:56 -0400 |
commit | f2d488dea1a4ac233b11779dfea645e8d7276fda (patch) | |
tree | 651ad659767ae51b5da7034802fd2e8975b21a00 /gtk/gtklockbutton.c | |
parent | 063bd57873155ef95d63d74340c53d18fbe2790f (diff) | |
download | gtk+-f2d488dea1a4ac233b11779dfea645e8d7276fda.tar.gz |
Fixed crash in GtkLockButton if a button with permission set to NULL is clicked.
https://bugzilla.gnome.org/show_bug.cgi?id=728992
Diffstat (limited to 'gtk/gtklockbutton.c')
-rw-r--r-- | gtk/gtklockbutton.c | 6 |
1 files 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)) |