Commit 5cbe6126 authored by Christian Beier's avatar Christian Beier Committed by Johannes Schindelin

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: 's avatarChristian Beier <dontmind@freeshell.org>
Signed-off-by: 's avatarJohannes Schindelin <johannes.schindelin@gmx.de>
parent b6d59835
......@@ -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=
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment