diff options
| author | Albert Cervin <albert@acervin.com> | 2025-11-24 22:51:46 +0100 |
|---|---|---|
| committer | Albert Cervin <albert@acervin.com> | 2025-11-24 22:51:46 +0100 |
| commit | 7455c673e62d14314c7c45151f139d5f4e3e25e2 (patch) | |
| tree | 2a820ea5c408a16082dc34460bbd76b23391acfa /src/main/main.c | |
| parent | fb91c582ad5b552f3ed081fb2737d682a7cad181 (diff) | |
| download | dged-7455c673e62d14314c7c45151f139d5f4e3e25e2.tar.gz dged-7455c673e62d14314c7c45151f139d5f4e3e25e2.tar.xz dged-7455c673e62d14314c7c45151f139d5f4e3e25e2.zip | |
Fix crashes when killing buffers
Now, if you kill all buffers, the editor will shut down :)
Diffstat (limited to 'src/main/main.c')
| -rw-r--r-- | src/main/main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/main.c b/src/main/main.c index 2e2df58..70c62a3 100644 --- a/src/main/main.c +++ b/src/main/main.c @@ -391,6 +391,11 @@ int main(int argc, char *argv[]) { needs_render = true; } + if (buffers_num_buffers(&buflist) == 0) { + running = false; + continue; + } + // TODO: maybe this should be hidden behind something // The placement is correct though. buffers_for_each(&buflist, clear_buffer_props, NULL); |
