]> source.dussan.org Git - tigervnc.git/commitdiff
Catch errors resizing framebuffer
authorPierre Ossman <ossman@cendio.se>
Sat, 23 May 2020 10:17:34 +0000 (12:17 +0200)
committerPierre Ossman <ossman@cendio.se>
Sat, 23 May 2020 10:17:34 +0000 (12:17 +0200)
unix/xserver/hw/vnc/vncExtInit.cc

index b87aefcae1fc764ecf083a9e48309314747e8322..e2dd4eee9ea2137c5a2280607b6097f8c0aff1b3 100644 (file)
@@ -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();