Skip to content

Commit

Permalink
[0.74] Ensure D2D device context is not used outside Begin/End draw (#…
Browse files Browse the repository at this point in the history
…13010)

* Ensure D2D device context is not used outside Begin/End draw

* Change files
  • Loading branch information
acoates-ms committed Apr 29, 2024
1 parent dbf4815 commit a16c243
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Ensure D2D device context is not used outside Begin/End draw",
"packageName": "react-native-windows",
"email": "30809111+acoates-ms@users.noreply.github.com",
"dependentChangeType": "patch"
}
1 change: 1 addition & 0 deletions vnext/Microsoft.ReactNative.Cxx/AutoDraw.h
Expand Up @@ -20,6 +20,7 @@ class AutoDrawDrawingSurface {

~AutoDrawDrawingSurface() noexcept {
if (m_d2dDeviceContext) {
m_d2dDeviceContext = nullptr;
m_drawingSurfaceInterop->EndDraw();
}
}
Expand Down

0 comments on commit a16c243

Please sign in to comment.