Skip to content

Commit 8f70489

Browse files
authored
Fix crash if bitmapStream is null. Fixes #10390 (#10436)
This fixes a regression introduced in 3854d32. Cherry-picked from 33d29f7. Conflicts: src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapDecoder.cs
1 parent fd3cc8e commit 8f70489

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
@@ -1190,7 +1190,7 @@ out decoder
11901190
}
11911191
catch
11921192
{
1193-
bitmapStream.Close();
1193+
bitmapStream?.Close();
11941194
#pragma warning disable 6500
11951195

11961196
decoderHandle = null;

0 commit comments

Comments
 (0)