Fix two GTK runtime warnings in RSSyl feed properties dialog.
authorAndrej Kacian <ticho@claws-mail.org>
Fri, 3 Aug 2018 07:24:29 +0000 (09:24 +0200)
committerAndrej Kacian <ticho@claws-mail.org>
Fri, 3 Aug 2018 07:24:29 +0000 (09:24 +0200)
src/plugins/rssyl/rssyl_feed_props.c

index 112640e0a957678d6924aabec85b9af06ab6d35c..ab079c04304f118bbe04210d5099c6e3f5df0fae 100644 (file)
@@ -274,13 +274,14 @@ void rssyl_gtk_prop(RFolderItem *ritem)
        /* Auth username */
        feedprop->auth_username = gtk_entry_new();
        gtk_entry_set_text(GTK_ENTRY(feedprop->auth_username),
-                       ritem->auth->username);
+                       (ritem->auth->username != NULL ? ritem->auth->username : ""));
 
        /* Auth password */
        feedprop->auth_password = gtk_entry_new();
        gtk_entry_set_visibility(GTK_ENTRY(feedprop->auth_password), FALSE);
        gchar *pwd = rssyl_passwd_get(ritem);
-       gtk_entry_set_text(GTK_ENTRY(feedprop->auth_password), pwd);
+       gtk_entry_set_text(GTK_ENTRY(feedprop->auth_password),
+                       (pwd != NULL ? pwd : ""));
        if (pwd != NULL) {
                memset(pwd, 0, strlen(pwd));
                g_free(pwd);