summaryrefslogtreecommitdiffstats
path: root/vncterm
diff options
context:
space:
mode:
Diffstat (limited to 'vncterm')
-rw-r--r--vncterm/LinuxVNC.c4
-rw-r--r--vncterm/VNConsole.c4
2 files changed, 5 insertions, 3 deletions
diff --git a/vncterm/LinuxVNC.c b/vncterm/LinuxVNC.c
index 2534341..5a3c3a3 100644
--- a/vncterm/LinuxVNC.c
+++ b/vncterm/LinuxVNC.c
@@ -113,7 +113,9 @@ int main(int argc,char **argv)
sprintf(title,"LinuxVNC: /dev/tty%d",tty);
/* console init */
- console=vcGetConsole(&argc,argv,width,height,&vgaFont,TRUE);
+ if(!(console=vcGetConsole(&argc,argv,width,height,&vgaFont,TRUE)))
+ exit(1);
+
for(i=0;i<16;i++) {
console->screen->colourMap.data.bytes[i*3+0]=default_red[color_table[i]];
console->screen->colourMap.data.bytes[i*3+1]=default_grn[color_table[i]];
diff --git a/vncterm/VNConsole.c b/vncterm/VNConsole.c
index d0757ba..e87df54 100644
--- a/vncterm/VNConsole.c
+++ b/vncterm/VNConsole.c
@@ -121,8 +121,8 @@ vncConsolePtr vcGetConsole(int *argc,char **argv,
if(c->cy1<0)
c->cy2=0;
- c->screen=
- rfbGetScreen(argc,argv,c->cWidth*c->width,c->cHeight*c->height,8,1,1);
+ if(!(c->screen = rfbGetScreen(argc,argv,c->cWidth*c->width,c->cHeight*c->height,8,1,1)))
+ return NULL;
c->screen->screenData=(void*)c;
c->screen->displayHook=vcMakeSureCursorIsDrawn;
c->screen->frameBuffer=