[recipes] Avoid a crash
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] Avoid a crash
- Date: Mon, 13 Feb 2017 22:50:09 +0000 (UTC)
commit c48bca0a460c7e424ef5b534ffab51e2146b5f33
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Feb 13 17:49:35 2017 -0500
Avoid a crash
We pass NULL for callback in some places, so better check first.
src/gr-account.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/gr-account.c b/src/gr-account.c
index 6cf1695..d905b8c 100644
--- a/src/gr-account.c
+++ b/src/gr-account.c
@@ -314,7 +314,8 @@ gr_ensure_user_chef (GtkWindow *window,
chef = gr_recipe_store_get_chef (store, gr_recipe_store_get_user_key (store));
if (chef) {
- callback (chef, data);
+ if (callback)
+ callback (chef, data);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]