Make sure we don't get wrapped DXGI objects created with NULL inner ptrs

This commit is contained in:
baldurk
2015-06-04 22:29:07 +02:00
parent 4f5149a363
commit 0a61d13d64
+6
View File
@@ -473,6 +473,12 @@ HRESULT WrappedIDXGISwapChain2::Present1(UINT SyncInterval, UINT Flags, const DX
bool RefCountDXGIObject::HandleWrap(REFIID riid, void **ppvObject)
{
if(ppvObject == NULL || *ppvObject == NULL)
{
RDCWARN("HandleWrap called with NULL ppvObject");
return false;
}
if(riid == __uuidof(IDXGIDevice))
{
// should have been handled elsewhere, so we can properly create this device