[gnome-control-center/wip/oholy/password-crashes: 139/139] user-accounts: Fix crash when password dialog is cancelled
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/oholy/password-crashes: 139/139] user-accounts: Fix crash when password dialog is cancelled
- Date: Fri, 7 Jun 2019 17:05:13 +0000 (UTC)
commit 31cee4caf8acc317dbba43b3f5e75e473efac6e2
Author: Ondrej Holy <oholy redhat com>
Date: Fri Jun 7 09:52:42 2019 +0200
user-accounts: Fix crash when password dialog is cancelled
If "Esc" is pressed, the callbacks to handle the `focus-out` signal are
called after the `cc_password_dialog_dispose` function. This leads to
segfaults, because the `user` variable is already cleared. Let's simply
do not continue if `user == NULL` to fix those crashes.
Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/issues/563
panels/user-accounts/cc-password-dialog.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/panels/user-accounts/cc-password-dialog.c b/panels/user-accounts/cc-password-dialog.c
index 449b1b1a3..9476a8be5 100644
--- a/panels/user-accounts/cc-password-dialog.c
+++ b/panels/user-accounts/cc-password-dialog.c
@@ -324,7 +324,8 @@ password_entry_focus_out_cb (CcPasswordDialog *self)
self->password_entry_timeout_id = 0;
}
- password_entry_timeout (self);
+ if (self->user != NULL)
+ password_entry_timeout (self);
return FALSE;
}
@@ -382,7 +383,8 @@ old_password_entry_focus_out_cb (CcPasswordDialog *self)
self->old_password_entry_timeout_id = 0;
}
- old_password_entry_timeout (self);
+ if (self->user != NULL)
+ old_password_entry_timeout (self);
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]