talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 964f268a7099f440882552c78b415bceded6f0e4
parent cc3ffa1e257c300f99dd667def929e44eb0945cf
Author: Ricardo Mones <ricardo@mones.org>
Date:   Wed,  4 Jan 2023 19:50:09 +0100

Fix CID 1518897

Diffstat:
Msrc/folderview.c | 11++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/folderview.c b/src/folderview.c @@ -2000,9 +2000,14 @@ static void folderview_set_sens_and_popup_menu(FolderView *folderview, gint row, SET_SENS("FolderViewPopup/Processing", item->node->parent != NULL && !item->no_select && !item->processing_pending); - SET_SENS("FolderViewPopup/OpenFolder", item->node->parent != NULL - && (!prefs_common.goto_folder_on_startup - || strcmp(folder_item_get_identifier(item), prefs_common.startup_folder))); + if (item->node->parent != NULL) { + gchar *id = folder_item_get_identifier(item); + SET_SENS("FolderViewPopup/OpenFolder", !prefs_common.goto_folder_on_startup + || strcmp(id, prefs_common.startup_folder)); + g_free(id); + } else { + SET_SENS("FolderViewPopup/OpenFolder", FALSE); + } if (item == folder->trash || item == special_trash || folder_has_parent_of_type(item, F_TRASH)) {