From 636a9e786881dd42cd6fd579e13b7895cf9f10eb Mon Sep 17 00:00:00 2001 From: Phil Blundell Date: Sat, 13 Nov 2004 18:03:16 +0000 Subject: [PATCH] Don't leave stale pointers hanging around after ts_close(). (TslibFini): Likewise. --- hw/kdrive/linux/tslib.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/kdrive/linux/tslib.c b/hw/kdrive/linux/tslib.c index e22ebd93f..839eb375b 100644 --- a/hw/kdrive/linux/tslib.c +++ b/hw/kdrive/linux/tslib.c @@ -156,6 +156,7 @@ static void TslibDisable (int fd, void *closure) { ts_close(tsDev); + tsDev = NULL; } static int @@ -237,7 +238,10 @@ TslibFini (void) { if (mi->inputType == TsInputType) { - if(mi->driver) ts_close(tsDev); + if(mi->driver) { + ts_close(tsDev); + tsDev = NULL; + } mi->driver = 0; mi->inputType = 0; }