changeset 32381:2bd1aae2b3c6

Fix validity checks before closing a file descriptor. -1 is invalid (and the initial value), 0 is not.
author reimar
date Sat, 09 Oct 2010 13:35:16 +0000
parents c2370492acbc
children 9a5340bb1f69
files libvo/vo_dxr3.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_dxr3.c	Sat Oct 09 13:31:03 2010 +0000
+++ b/libvo/vo_dxr3.c	Sat Oct 09 13:35:16 2010 +0000
@@ -705,13 +705,13 @@
 		}
 	}
 
-	if (fd_video) {
+	if (fd_video != -1) {
 		close(fd_video);
 	}
-	if (fd_spu) {
+	if (fd_spu != -1) {
 		close(fd_spu);
 	}
-	if (fd_control) {
+	if (fd_control != -1) {
 		close(fd_control);
 	}
 #ifdef SPU_SUPPORT