Unset default folder when it gets deleted.

This commit is contained in:
Michael Drake 2013-08-27 13:31:40 +01:00
parent fb9353f220
commit 4bf5ec0dad

View File

@ -303,6 +303,8 @@ static nserror hotlist_tree_node_folder_cb(
switch (msg.msg) { switch (msg.msg) {
case TREE_MSG_NODE_DELETE: case TREE_MSG_NODE_DELETE:
if (f == hl_ctx.default_folder)
hl_ctx.default_folder = NULL;
free((void*)f->data.value); /* Eww */ free((void*)f->data.value); /* Eww */
free(f); free(f);
break; break;