summaryrefslogtreecommitdiffstats
path: root/examples/example.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/example.c')
-rw-r--r--examples/example.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/example.c b/examples/example.c
index 31bc38d..93fdf28 100644
--- a/examples/example.c
+++ b/examples/example.c
@@ -279,8 +279,9 @@ static void MakeRichCursor(rfbScreenInfoPtr rfbScreen)
int main(int argc,char** argv)
{
- rfbScreenInfoPtr rfbScreen =
- rfbGetScreen(&argc,argv,maxx,maxy,8,3,bpp);
+ rfbScreenInfoPtr rfbScreen = rfbGetScreen(&argc,argv,maxx,maxy,8,3,bpp);
+ if(!rfbScreen)
+ return 0;
rfbScreen->desktopName = "LibVNCServer Example";
rfbScreen->frameBuffer = (char*)malloc(maxx*maxy*bpp);
rfbScreen->alwaysShared = TRUE;