diff options
Diffstat (limited to 'libsylph/procmsg.c')
-rw-r--r-- | libsylph/procmsg.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libsylph/procmsg.c b/libsylph/procmsg.c index 4cb56811..e212a7cd 100644 --- a/libsylph/procmsg.c +++ b/libsylph/procmsg.c @@ -1238,7 +1238,12 @@ gboolean procmsg_trash_messages_exist(void) void procmsg_empty_trash(FolderItem *trash) { - if (trash && trash->total > 0) { + if (!trash) + return; + + g_return_if_fail(trash->stype == F_TRASH); + + if (trash->total > 0) { debug_print("Emptying messages in %s ...\n", trash->path); folder_item_remove_all_msg(trash); |