[recipes] Avoid a crash in save_chef_dialog



commit 53a0001524e1e468a5eaff58b2afae617b35a4f4
Author: Ekta Nandwani <mailnandwaniekta gmail com>
Date:   Fri Mar 3 22:53:02 2017 +0530

    Avoid a crash in save_chef_dialog
    
    Handle the condition where id is NULL just like the empty string
    
    https://bugzilla.gnome.org/show_bug.cgi?id=779546

 src/gr-chef-dialog.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/gr-chef-dialog.c b/src/gr-chef-dialog.c
index 060a351..f2081ba 100644
--- a/src/gr-chef-dialog.c
+++ b/src/gr-chef-dialog.c
@@ -204,7 +204,7 @@ save_chef_dialog (GrChefDialog  *self,
 
         store = gr_app_get_recipe_store (GR_APP (g_application_get_default ()));
 
-        if (id[0] != '\0') {
+        if (id != NULL && id[0] != '\0'){
                 g_object_set (self->chef,
                               "fullname", fullname,
                               "name", name,


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