xserver/hw/kdrive/linux tslib.c,1.10,1.11

Phil Blundell <xserver-commit-u7BhqnqprCWvj1b/[email protected]>
Newsgroups gmane.comp.freedesktop.xserver.cvs
Message-ID <[email protected]>
Committed by: pb

Update of /cvs/xserver/xserver/hw/kdrive/linux
In directory gabe:/tmp/cvs-serv10389/hw/kdrive/linux

Modified Files:
	tslib.c 
Log Message:
2004-11-13  Phil Blundell  <pb-Y0/[email protected]>

	* hw/kdrive/linux/tslib.c (TslibDisable): Don't leave stale
	pointers hanging around after ts_close().
	(TslibFini): Likewise.



Index: tslib.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/linux/tslib.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- tslib.c	2 Jul 2004 21:30:00 -0000	1.10
+++ tslib.c	13 Nov 2004 18:03:16 -0000	1.11
@@ -156,6 +156,7 @@
 TslibDisable (int fd, void *closure)
 {
   ts_close(tsDev);
+  tsDev = NULL;
 }
 
 static int
@@ -237,7 +238,10 @@
     {
 	if (mi->inputType == TsInputType)
 	{
-	    if(mi->driver) ts_close(tsDev);
+	    if(mi->driver) {
+		ts_close(tsDev);
+		tsDev = NULL;
+	    }
 	    mi->driver = 0;
 	    mi->inputType = 0;
 	}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.