summaryrefslogtreecommitdiffstats
path: root/libvncclient/vncviewer.c
diff options
context:
space:
mode:
Diffstat (limited to 'libvncclient/vncviewer.c')
-rw-r--r--libvncclient/vncviewer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libvncclient/vncviewer.c b/libvncclient/vncviewer.c
index 914b422..2a11970 100644
--- a/libvncclient/vncviewer.c
+++ b/libvncclient/vncviewer.c
@@ -91,6 +91,10 @@ static void initAppData(AppData* data) {
rfbClient* rfbGetClient(int bitsPerSample,int samplesPerPixel,
int bytesPerPixel) {
rfbClient* client=(rfbClient*)calloc(sizeof(rfbClient),1);
+ if(!client) {
+ rfbClientErr("Couldn't allocate client structure!\n");
+ return 0;
+ }
initAppData(&client->appData);
client->programName = 0;
client->endianTest = 1;