diff --git a/src/framework/chef.c b/src/framework/chef.c index c56f19a..0e3fd1f 100644 --- a/src/framework/chef.c +++ b/src/framework/chef.c @@ -91,8 +91,10 @@ chef_set_note (Target_t *target, const char *note_zh, const char *note_en) if (!target) return; - char *msg = CHINESE ? xy_strdup(note_zh) : xy_strdup(note_en); - target->note = msg; + const char *msg = CHINESE ? note_zh : note_en; + + if (msg) + target->note = xy_strdup(msg); }