message: Handle a NULL device passed into IDXGIOutput::FindClosestMatchingMode
diff: @@ -618,6 +618,8 @@ WrappedIDXGIOutput6::~WrappedIDXGIOutput6()
  HRESULT STDMETHODCALLTYPE WrappedIDXGIOutput6::FindClosestMatchingMode(
  const DXGI_MODE_DESC *pModeToMatch, DXGI_MODE_DESC *pClosestMatch, IUnknown *pConcernedDevice)
  +{
  + if(pConcernedDevice)
  {
  ID3DDevice *wrapDevice = GetD3DDevice(pConcernedDevice);
  @@ -625,12 +627,14 @@ HRESULT STDMETHODCALLTYPE WrappedIDXGIOutput6::FindClosestMatchingMode(
  return m_pReal->FindClosestMatchingMode(pModeToMatch, pClosestMatch,
  wrapDevice->GetRealIUnknown());
  - if(pConcernedDevice)
  RDCERR("Unrecognised device in FindClosestMatchingMode()");
  return E_INVALIDARG;
  }
  + return m_pReal->FindClosestMatchingMode(pModeToMatch, pClosestMatch, NULL);
  +}
  +
  HRESULT STDMETHODCALLTYPE WrappedIDXGIOutput6::TakeOwnership(IUnknown *pDevice, BOOL Exclusive)
  {
  ID3DDevice *wrapDevice = GetD3DDevice(pDevice);
  @@ -645,6 +649,8 @@ HRESULT STDMETHODCALLTYPE WrappedIDXGIOutput6::TakeOwnership(IUnknown *pDevice,
  HRESULT STDMETHODCALLTYPE WrappedIDXGIOutput6::FindClosestMatchingMode1(
  const DXGI_MODE_DESC1 *pModeToMatch, DXGI_MODE_DESC1 *pClosestMatch, IUnknown *pConcernedDevice)
  +{
  + if(pConcernedDevice)
  {
  ID3DDevice *wrapDevice = GetD3DDevice(pConcernedDevice);
  @@ -652,12 +658,14 @@ HRESULT STDMETHODCALLTYPE WrappedIDXGIOutput6::FindClosestMatchingMode1(
  return m_pReal1->FindClosestMatchingMode1(pModeToMatch, pClosestMatch,
  wrapDevice->GetRealIUnknown());
  - if(pConcernedDevice)
  RDCERR("Unrecognised device in FindClosestMatchingMode1()");
  return E_INVALIDARG;
  }
  + return m_pReal1->FindClosestMatchingMode1(pModeToMatch, pClosestMatch, NULL);
  +}
  +
  HRESULT STDMETHODCALLTYPE WrappedIDXGIOutput6::GetDisplaySurfaceData1(IDXGIResource *pDestination)
  {
  return m_pReal1->GetDisplaySurfaceData1(UnwrapDXGIResource(pDestination));
  