In lib/libgii/gii/gii.c, in the function
int giiClose(struct gii_input *inp);
there is this code at the end of the closing loop:
curr = curr->next;
_giiInputFree(curr->prev);
} while (curr!=inp); /* looped through once. */
The call to _giiInputFree() segfaults if curr==inp, so I changed it
into this:
curr = curr->next;
if (curr != inp)
_giiInputFree(curr->prev);
} while (curr!=inp); /* looped through once. */
This of course works, but it's both ugly and I get the idea that
an input is not closed now.
Unfortunately this didn't solve the segfault I get when the simple
test program exits. Again, here is a simple program that exits with a
segfault when run from the svgalib target:
#include <ggi/ggi.h>
int main()
{
ggi_visual_t v;
ggiInit();
v = ggiOpen(NULL);
ggiSetGraphMode(v,320,200,GGI_AUTO,GGI_AUTO,GT_8BIT);
ggiClose(v);
v = ggiOpen(NULL);
ggiSetGraphMode(v,320,200,GGI_AUTO,GGI_AUTO,GT_8BIT);
ggiClose(v);
return 0;
}
Any ideas/hints/help ?
--
Tijs van Bakel, <[EMAIL PROTECTED]>