2008-09-17 [colin] 3.5.0cvs112
[claws.git] / src / prefs_folder_item.c
index f4ef920e7d3d977598c0f2933040d7989708e8ac..652d53689f977c13e4e77dbd4986244ffda7fb7c 100644 (file)
@@ -939,7 +939,8 @@ static void prefs_folder_item_compose_create_widget_func(PrefsPage * page_,
                item->prefs->default_dictionary = tmp;
                dictionary = item->prefs->default_dictionary;
        }
-       if (strchr(item->prefs->default_dictionary, '-')) {
+       if (item->prefs->default_dictionary &&
+           strchr(item->prefs->default_dictionary, '-')) {
                *(strchr(item->prefs->default_dictionary, '-')) = '\0';
        }
        if (dictionary)
@@ -972,7 +973,8 @@ static void prefs_folder_item_compose_create_widget_func(PrefsPage * page_,
                item->prefs->default_alt_dictionary = tmp;
                dictionary = item->prefs->default_alt_dictionary;
        }
-       if (strchr(item->prefs->default_alt_dictionary, '-')) {
+       if (item->prefs->default_alt_dictionary &&
+           strchr(item->prefs->default_alt_dictionary, '-')) {
                *(strchr(item->prefs->default_alt_dictionary, '-')) = '\0';
        }
        if (dictionary)