TizenRefApp-9514 Crash after saving empty signature field 87/154187/1 submit/tizen_4.0/20171018.092506 submit/tizen_4.0/20171020.081315 tizen_4.0.IoT.p2_release tizen_4.0.m2_release
authorIgor Olshevskyi <i.olshevskyi@samsung.com>
Mon, 9 Oct 2017 10:19:47 +0000 (13:19 +0300)
committerIgor Olshevskyi <i.olshevskyi@samsung.com>
Mon, 9 Oct 2017 10:19:55 +0000 (13:19 +0300)
Change-Id: Ie52d1778b41e0b954b6d5c082cb357a19611ed32

modules/setting/src/email-view-signature-setting.c

index 95b7275..d22bc69 100644 (file)
@@ -153,7 +153,11 @@ static void _update_single_line_signature(EmailSettingView *view)
        if (!view->account_data)
                return;
 
-       view->single_line_signature = strdup(view->account_data->options.signature);
+       if (view->account_data->options.signature) {
+               view->single_line_signature = strdup(view->account_data->options.signature);
+       } else {
+               view->single_line_signature = strdup("");
+       }
 
        char *p = view->single_line_signature;
        while ((p = strchr(p, '\n')) != NULL)