Skip to content

Commit 33d29f7

Browse files
authored
Fix crash if bitmapStream is null. Fixes #10390 (#10428)
This fixes a regression introduced in 3854d32.
1 parent 821ceb4 commit 33d29f7

File tree

1 file changed

+1
-1
lines changed
  • src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging

1 file changed

+1
-1
lines changed

src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapDecoder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1165,7 +1165,7 @@ out decoder
11651165
}
11661166
catch
11671167
{
1168-
bitmapStream.Close();
1168+
bitmapStream?.Close();
11691169

11701170
decoderHandle = null;
11711171
throw;

0 commit comments

Comments
 (0)