degesch: fix segfault
This commit is contained in:
parent
f308b3fb5d
commit
e000a6b495
16
degesch.c
16
degesch.c
|
@ -1527,10 +1527,20 @@ buffer_send_internal (struct app_context *ctx, struct buffer *buffer,
|
||||||
buffer->lines_count++;
|
buffer->lines_count++;
|
||||||
|
|
||||||
if (buffer == ctx->current_buffer)
|
if (buffer == ctx->current_buffer)
|
||||||
|
{
|
||||||
buffer_line_display (ctx, line, false);
|
buffer_line_display (ctx, line, false);
|
||||||
else if (!ctx->isolate_buffers &&
|
return;
|
||||||
(buffer == ctx->global_buffer ||
|
}
|
||||||
buffer == ctx->current_buffer->server->buffer))
|
|
||||||
|
bool can_leak = false;
|
||||||
|
if ((buffer == ctx->global_buffer)
|
||||||
|
|| (ctx->current_buffer->type == BUFFER_GLOBAL
|
||||||
|
&& buffer->type == BUFFER_SERVER)
|
||||||
|
|| (ctx->current_buffer->type != BUFFER_GLOBAL
|
||||||
|
&& buffer == ctx->current_buffer->server->buffer))
|
||||||
|
can_leak = true;
|
||||||
|
|
||||||
|
if (!ctx->isolate_buffers && can_leak)
|
||||||
buffer_line_display (ctx, line, true);
|
buffer_line_display (ctx, line, true);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue