From: Pierre Ossman Date: Sat, 23 May 2020 10:17:34 +0000 (+0200) Subject: Catch errors resizing framebuffer X-Git-Tag: v1.10.90~29 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=11080322a0e60cccda7b9bab6ef79be71f77b9b6;p=tigervnc.git Catch errors resizing framebuffer --- diff --git a/unix/xserver/hw/vnc/vncExtInit.cc b/unix/xserver/hw/vnc/vncExtInit.cc index b87aefca..e2dd4eee 100644 --- a/unix/xserver/hw/vnc/vncExtInit.cc +++ b/unix/xserver/hw/vnc/vncExtInit.cc @@ -413,8 +413,13 @@ void vncPostScreenResize(int scrIdx, int success, int width, int height) { if (success) { // Let the RFB core know of the new dimensions and framebuffer - desktop[scrIdx]->setFramebuffer(width, height, - vncFbptr[scrIdx], vncFbstride[scrIdx]); + try { + desktop[scrIdx]->setFramebuffer(width, height, + vncFbptr[scrIdx], + vncFbstride[scrIdx]); + } catch (rdr::Exception& e) { + vncFatalError("vncPostScreenResize: %s\n", e.str()); + } } desktop[scrIdx]->unblockUpdates();