summaryrefslogtreecommitdiffstats
path: root/client_examples/ppmtest.c
diff options
context:
space:
mode:
Diffstat (limited to 'client_examples/ppmtest.c')
-rw-r--r--client_examples/ppmtest.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/client_examples/ppmtest.c b/client_examples/ppmtest.c
index 01ee6a7..6b84ad3 100644
--- a/client_examples/ppmtest.c
+++ b/client_examples/ppmtest.c
@@ -31,7 +31,11 @@ void SaveFramebufferAsPPM(rfbClient* client, int x, int y, int w, int h) {
return;
}
- f=fopen("/tmp/framebuffer.ppm","wb");
+ f=fopen("framebuffer.ppm","wb");
+ if(!f) {
+ rfbClientErr("Could not open framebuffer.ppm\n");
+ return;
+ }
fprintf(f,"P6\n# %s\n%d %d\n255\n",client->desktopName,client->width,client->height);
for(j=0;j<client->height*row_stride;j+=row_stride)