Exit on mode change intead of crashing

pixman-rendering
Andri Yngvason 2020-07-07 10:08:27 +00:00
parent f49791880f
commit 78c1616a46
1 changed files with 5 additions and 2 deletions

View File

@ -497,8 +497,11 @@ void wayvnc_process_frame(struct wayvnc* self)
self->screencopy.back->height);
} else {
// TODO: Reallocate
assert(width == nvnc_fb_get_width(self->buffer));
assert(height == nvnc_fb_get_height(self->buffer));
if (width != nvnc_fb_get_width(self->buffer) ||
height != nvnc_fb_get_height(self->buffer)) {
wayvnc_exit(self);
return;
}
}
struct pixman_region16 txdamage, refined;