summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/gui-buffer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c
index 16afc0133..cb0051574 100644
--- a/src/gui/gui-buffer.c
+++ b/src/gui/gui-buffer.c
@@ -185,6 +185,10 @@ gui_buffer_valid (struct t_gui_buffer *buffer)
{
struct t_gui_buffer *ptr_buffer;
+ /* NULL buffer is valid (it's for printing on first buffer) */
+ if (!buffer)
+ return 1;
+
for (ptr_buffer = gui_buffers; ptr_buffer;
ptr_buffer = ptr_buffer->next_buffer)
{