summaryrefslogtreecommitdiffstats
path: root/cursor.c
diff options
context:
space:
mode:
authordscho <dscho>2001-09-27 15:42:54 +0000
committerdscho <dscho>2001-09-27 15:42:54 +0000
commit11d64787ee113b4767d0f2e96e8b2ded6999064e (patch)
tree64e26faf7d0316e840ce8bbbcf63892d42be86a5 /cursor.c
parent080ad356d38dcb2acf3cdc4e1c30b9ee12251ba0 (diff)
downloadlibvncserver-11d64787ee113b4767d0f2e96e8b2ded6999064e.zip
libvncserver-11d64787ee113b4767d0f2e96e8b2ded6999064e.tar.gz
added setTranslateFunction as member of rfbScreenInfo,
cursor may be NULL (no cursor).
Diffstat (limited to 'cursor.c')
-rw-r--r--cursor.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cursor.c b/cursor.c
index 9168b31..f34a397 100644
--- a/cursor.c
+++ b/cursor.c
@@ -370,7 +370,10 @@ void rfbDrawCursor(rfbClientPtr cl)
rfbCursorPtr c=s->cursor;
int i,j,x1,x2,y1,y2,i1,j1,bpp=s->rfbServerFormat.bitsPerPixel/8,
rowstride=s->paddedWidthInBytes,
- bufSize=c->width*c->height*bpp,w=(c->width+7)/8;
+ bufSize,w;
+ if(!c) return;
+ bufSize=c->width*c->height*bpp;
+ w=(c->width+7)/8;
if(s->cursorIsDrawn)
rfbUndrawCursor(cl);
if(s->underCursorBufferLen<bufSize) {
OpenPOWER on IntegriCloud