aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui-todo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui-todo.c')
-rw-r--r--src/ui-todo.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ui-todo.c b/src/ui-todo.c
index b65b8d3..6fdd08f 100644
--- a/src/ui-todo.c
+++ b/src/ui-todo.c
@@ -327,6 +327,11 @@ void ui_todo_popup_item(void)
asprintf(&notepath, "%s%s", path_notes, item->note);
fp = fopen(notepath, "r");
+ if (fp == NULL) {
+ item_in_popup(NULL, NULL, item->mesg, _("TODO:"));
+ return;
+ }
+
note_read_contents(note, note_size, fp);
fclose(fp);
mem_free(notepath);