Browse Source

Don't try to render cursors with no size

Even if there are no pixels it will still trigger sanity checks
when we start throwing bogus coordinates around.
tags/v1.7.90
Pierre Ossman 7 years ago
parent
commit
28055e2897
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      common/rfb/Cursor.cxx

+ 5
- 0
common/rfb/Cursor.cxx View File

@@ -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);


Loading…
Cancel
Save