From 5d441d59a0b443093fe646f3c768d0ee176e4f59 Mon Sep 17 00:00:00 2001
From: Karlson2k <k2k@narod.ru>
Date: Mon, 20 Aug 2012 21:41:38 +0400
Subject: Fix CircularCache::Open CreateFileMapping returns "NULL" on error
 (not "INVALID_HANDLE_VALUE")

---
 xbmc/filesystem/CircularCache.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xbmc/filesystem/CircularCache.cpp b/xbmc/filesystem/CircularCache.cpp
index 30429d19c0..a0de8d4c10 100644
--- a/xbmc/filesystem/CircularCache.cpp
+++ b/xbmc/filesystem/CircularCache.cpp
@@ -1,5 +1,5 @@
 /*
- *      Copyright (C) 2005-2008 Team XBMC
+ *      Copyright (C) 2005-2012 Team XBMC
  *      http://www.xbmc.org
  *
  *  This Program is free software; you can redistribute it and/or modify
@@ -51,7 +51,7 @@ int CCircularCache::Open()
 {
 #ifdef _WIN32
   m_handle = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, m_size, NULL);
-  if(m_handle == INVALID_HANDLE_VALUE)
+  if(m_handle == NULL)
     return CACHE_RC_ERROR;
   m_buf = (uint8_t*)MapViewOfFile(m_handle, FILE_MAP_ALL_ACCESS, 0, 0, 0);
 #else
-- 
cgit v1.2.3