diff options
Diffstat (limited to 'vncviewer/X11PixelBuffer.cxx')
-rw-r--r-- | vncviewer/X11PixelBuffer.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/vncviewer/X11PixelBuffer.cxx b/vncviewer/X11PixelBuffer.cxx index d84357c4..59b90e2c 100644 --- a/vncviewer/X11PixelBuffer.cxx +++ b/vncviewer/X11PixelBuffer.cxx @@ -21,7 +21,6 @@ #include <config.h> #endif -#include <assert.h> #include <stdlib.h> #include <FL/x.H> @@ -104,10 +103,12 @@ X11PixelBuffer::X11PixelBuffer(int width, int height) : if (!setupShm()) { xim = XCreateImage(fl_display, fl_visual->visual, fl_visual->depth, ZPixmap, 0, 0, width, height, BitmapPad(fl_display), 0); - assert(xim); + if (!xim) + throw rfb::Exception(_("Could not create framebuffer image")); xim->data = (char*)malloc(xim->bytes_per_line * xim->height); - assert(xim->data); + if (!xim->data) + throw rfb::Exception(_("Not enough memory for framebuffer")); } data = (rdr::U8*)xim->data; |