aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/rfb/Cursor.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/rfb/Cursor.cxx b/common/rfb/Cursor.cxx
index ffbe955c..99df82d6 100644
--- a/common/rfb/Cursor.cxx
+++ b/common/rfb/Cursor.cxx
@@ -283,6 +283,11 @@ void RenderedCursor::update(PixelBuffer* framebuffer,
buffer.setPF(format);
buffer.setSize(clippedRect.width(), clippedRect.height());
+ // Bail out early to avoid pestering the framebuffer with
+ // bogus coordinates
+ if (clippedRect.area() == 0)
+ return;
+
data = framebuffer->getBuffer(buffer.getRect(offset), &stride);
buffer.imageRect(buffer.getRect(), data, stride);