summaryrefslogtreecommitdiff
path: root/buffer.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-02-26 11:47:47 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-02-26 11:47:47 -0500
commita63ae9425561f3d2197c5d220be89fe92900adec (patch)
tree93665626fc2efa8a6227fb9ed46a8f3b64cc2aac /buffer.c
parentd453eedc5282074af83375532e8edcb68ada3300 (diff)
fixed some menu-related bugs
Diffstat (limited to 'buffer.c')
-rw-r--r--buffer.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/buffer.c b/buffer.c
index cb44eb4..ca58772 100644
--- a/buffer.c
+++ b/buffer.c
@@ -61,7 +61,10 @@ char const *buffer_get_filename(TextBuffer *buffer) {
}
bool buffer_is_untitled(TextBuffer *buffer) {
- return streq(buffer->filename, TED_UNTITLED);
+ if (buffer->filename)
+ return streq(buffer->filename, TED_UNTITLED);
+ else
+ return false;
}
// add this edit to the undo history