[gtk+/gtk-3-10] Fixed crash in GtkLockButton if a button with permission set to NULL is clicked.



commit 5ecac16441a265273494c7f59b676ec64df98918
Author: Juan Pablo Ugarte <juanpablougarte gmail com>
Date:   Fri Apr 25 19:18:28 2014 -0300

    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 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtklockbutton.c b/gtk/gtklockbutton.c
index dbd2fb6..5b3f156 100644
--- a/gtk/gtklockbutton.c
+++ b/gtk/gtklockbutton.c
@@ -445,8 +445,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))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]