From 5b2a062f0ee3e821843541ba8a6bd867179729a4 Mon Sep 17 00:00:00 2001 From: Jeroen Hofstee Date: Tue, 20 Sep 2022 13:10:59 +0200 Subject: [PATCH] don't resize an encoder if it is not set --- src/server.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/server.c b/src/server.c index 99ec209..8950584 100644 --- a/src/server.c +++ b/src/server.c @@ -1434,7 +1434,8 @@ static int send_desktop_resize(struct nvnc_client* client, struct nvnc_fb* fb) client->known_width = fb->width; client->known_height = fb->height; - encoder_resize(client->encoder, fb->width, fb->height); + if (client->encoder) + encoder_resize(client->encoder, fb->width, fb->height); pixman_region_union_rect(&client->damage, &client->damage, 0, 0, fb->width, fb->height);