LinuxVNC: fix segfault at "linuxvnc 1 -help".

This fixes Debian Bug #399501:
Switch to tty1.  Run "linuxvnc 1 -help".  You see help text,
followed by "Segmentation fault".

Signed-off-by: Christian Beier <dontmind@freeshell.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
pull/1/head
Christian Beier 15 years ago committed by Johannes Schindelin
parent b6d5983560
commit 5cbe612618

@ -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]];

@ -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=

Loading…
Cancel
Save