mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Direct2D: Add null check before reading from D2D texture
This commit is contained in:
parent
19aade443a
commit
bb53174196
1 changed files with 3 additions and 1 deletions
|
|
@ -615,7 +615,9 @@ public:
|
|||
if (presentParameters.DirtyRectsCount == 0)
|
||||
{
|
||||
D2D1_POINT_2U destPoint { 0, 0 };
|
||||
swap.buffer->CopyFromBitmap (&destPoint, paintedPresentation->getPresentationBitmap(), nullptr);
|
||||
|
||||
if (auto bitmap = paintedPresentation->getPresentationBitmap())
|
||||
swap.buffer->CopyFromBitmap (&destPoint, bitmap, nullptr);
|
||||
}
|
||||
|
||||
// Present the freshly painted buffer
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue