diff --git a/src/msw/graphicsd2d.cpp b/src/msw/graphicsd2d.cpp index ce55f1158c..9eb36a11a2 100644 --- a/src/msw/graphicsd2d.cpp +++ b/src/msw/graphicsd2d.cpp @@ -3345,7 +3345,7 @@ void wxD2DContext::Flush() { HRESULT result = m_renderTargetHolder->Flush(); - if (result == D2DERR_RECREATE_TARGET) + if (result == (HRESULT)D2DERR_RECREATE_TARGET) { ReleaseDeviceDependentResources(); }