Fixed crash in GtkLockButton if a button with permission set to NULL is clicked.

https://bugzilla.gnome.org/show_bug.cgi?id=728992
This commit is contained in:
Juan Pablo Ugarte 2014-04-25 19:18:28 -03:00 committed by Matthias Clasen
parent 063bd57873
commit f2d488dea1

View File

@ -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))