hello, I have a segfault when running this program on my 2 computers

linux 2.4.x, S3 Virge DX and Cyberblade, libggi 2.0.0

gdb told me that:
Program received signal SIGSEGV, Segmentation fault.
0x636f6c2f in ?? ()

<-- CUT HERE -->
#include <ggi/ggi.h>
#include <stdlib.h>

int main()
{

ggi_visual_t vis;
ggi_pixel blue;
ggi_color map;

map.r=0xffff;
map.g=0xffff;
map.b=0xffff;

blue=ggiMapColor(vis, &map);

if (ggiInit() < 0) {
        printf("Couldn't initialize GGI...\n");
        exit(1);
        }

if (!(vis = ggiOpen(NULL))) {
        printf("Couldn't open a visual...\n");
        }
else    {
        printf("Got a default visual!\n");
        ggiClose(vis);
        }

ggiFillscreen(vis);
ggiPutPixel(vis, 0, 0, blue);

getchar();

ggiExit();
return(0);
}
<-- CUT HERE-->

thx

--
benkenobi
fight stupidity and violence


Reply via email to