# HG changeset patch # User reimar # Date 1286631316 0 # Node ID 2bd1aae2b3c60a287cef451b46103c9741ceb561 # Parent c2370492acbcd4373e2053529cf8b501455152a5 Fix validity checks before closing a file descriptor. -1 is invalid (and the initial value), 0 is not. diff -r c2370492acbc -r 2bd1aae2b3c6 libvo/vo_dxr3.c --- 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