From a6340288f8259cc96b5af05bce3612dbf4f9b7e4 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sat, 4 Dec 2010 20:57:00 +0100 Subject: Show default icons if config file is missing. Bug introduced by 2b31c97de6fa541719cd26f9a61053cfc0e71203. "(null)" was shown instead of "<3" and "history = 5; settings->sortOrder = BAR_SORT_NAME_AZ; memcpy (settings->keys, defaultKeys, sizeof (defaultKeys)); + settings->loveIcon = strdup ("<3"); + settings->banIcon = strdup ("loveIcon); settings->loveIcon = strdup (val); } else if (streq ("ban_icon", key)) { + free (settings->banIcon); settings->banIcon = strdup (val); } } @@ -194,13 +198,5 @@ void BarSettingsRead (BarSettings_t *settings) { } } - /* use default strings */ - if (settings->loveIcon == NULL) { - settings->loveIcon = strdup ("<3"); - } - if (settings->banIcon == NULL) { - settings->banIcon = strdup ("