summaryrefslogtreecommitdiffstats
path: root/examples/pnmshow.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/pnmshow.c')
-rw-r--r--examples/pnmshow.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/pnmshow.c b/examples/pnmshow.c
index 734155f..6ced92a 100644
--- a/examples/pnmshow.c
+++ b/examples/pnmshow.c
@@ -65,6 +65,8 @@ int main(int argc,char** argv)
/* initialize data for vnc server */
rfbScreen = rfbGetScreen(&argc,argv,paddedWidth,height,8,(bitsPerPixelInFile+7)/8,bytesPerPixel);
+ if(!rfbScreen)
+ return 0;
if(argc>1)
rfbScreen->desktopName = argv[1];
else