From 4ff4d669ccb658b8b48785d37946378a5b29688c Mon Sep 17 00:00:00 2001 From: Leo Tenenbaum Date: Tue, 2 Feb 2021 11:26:50 -0500 Subject: big fix with buffer_pos_to_pixels also started rust highlighting --- ted.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ted.c') diff --git a/ted.c b/ted.c index 65f4dc5..73e0965 100644 --- a/ted.c +++ b/ted.c @@ -168,7 +168,7 @@ static Status ted_open_buffer(Ted *ted, u16 *buffer_idx, u16 *tab) { // Returns true on success static bool ted_open_file(Ted *ted, char const *filename) { u16 buffer_idx, tab_idx; - if (buffer_is_untitled(ted->active_buffer) && buffer_empty(ted->active_buffer)) { + if (ted->active_buffer && buffer_is_untitled(ted->active_buffer) && buffer_empty(ted->active_buffer)) { // the active buffer is just an empty untitled buffer. open it here. return buffer_load_file(ted->active_buffer, filename); } else if (ted_open_buffer(ted, &buffer_idx, &tab_idx)) { -- cgit v1.2.3