Don't leave stale pointers hanging around after ts_close(). (TslibFini):

Likewise.
This commit is contained in:
Phil Blundell 2004-11-13 18:03:16 +00:00
parent 36d9e01c0d
commit 636a9e7868

View File

@ -156,6 +156,7 @@ static void
TslibDisable (int fd, void *closure) TslibDisable (int fd, void *closure)
{ {
ts_close(tsDev); ts_close(tsDev);
tsDev = NULL;
} }
static int static int
@ -237,7 +238,10 @@ TslibFini (void)
{ {
if (mi->inputType == TsInputType) if (mi->inputType == TsInputType)
{ {
if(mi->driver) ts_close(tsDev); if(mi->driver) {
ts_close(tsDev);
tsDev = NULL;
}
mi->driver = 0; mi->driver = 0;
mi->inputType = 0; mi->inputType = 0;
} }