diff options
author | dscho <dscho> | 2004-12-01 18:21:39 +0000 |
---|---|---|
committer | dscho <dscho> | 2004-12-01 18:21:39 +0000 |
commit | 7d3b1c9762b5f2878e9783677677cb2b3aa10e7e (patch) | |
tree | cf6a503d0d89006e39de5f5c4393b89ba1d2c8e4 /libvncclient/vncviewer.c | |
parent | c641923d058c1f8927bb3169c5f78b0510adb72f (diff) | |
download | libtdevnc-7d3b1c9762b5f2878e9783677677cb2b3aa10e7e.tar.gz libtdevnc-7d3b1c9762b5f2878e9783677677cb2b3aa10e7e.zip |
use rfbClientErr to log errors, check if calloc succeded (both hinted by Andre Leiradella)
Diffstat (limited to 'libvncclient/vncviewer.c')
-rw-r--r-- | libvncclient/vncviewer.c | 4 |
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; |