Fix share handle usage

Trac #21810
Signed-off-by: Nicolas Capens

I don't think it was possible to use the sharehandle passed in, and if one was, we shouldn't clear it on release()

git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1352 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/renderer/SwapChain.cpp b/src/libGLESv2/renderer/SwapChain.cpp
index e1cd440..c474933 100644
--- a/src/libGLESv2/renderer/SwapChain.cpp
+++ b/src/libGLESv2/renderer/SwapChain.cpp
@@ -68,7 +68,8 @@
         mOffscreenTexture = NULL;
     }
 
-    mShareHandle = NULL;
+    if (mWindow)
+        mShareHandle = NULL;
 }
 
 static DWORD convertInterval(EGLint interval)
@@ -128,7 +129,6 @@
         mDepthStencil = NULL;
     }
 
-    mShareHandle = NULL;
     HANDLE *pShareHandle = NULL;
     if (!mWindow && mRenderer->getShareHandleSupport())
     {