Skip to content

Commit 302a280

Browse files
Update WebpChunkParsingUtils.cs
1 parent 370655b commit 302a280

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/ImageSharp/Formats/Webp/WebpChunkParsingUtils.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ public static void ParseOptionalChunks(
370370
return;
371371
}
372372

373-
if (metadata.ExifProfile != null)
373+
if (metadata.ExifProfile == null)
374374
{
375375
ExifProfile exifProfile = new(exifData);
376376

@@ -402,10 +402,7 @@ public static void ParseOptionalChunks(
402402
return;
403403
}
404404

405-
if (metadata.XmpProfile != null)
406-
{
407-
metadata.XmpProfile = new XmpProfile(xmpData);
408-
}
405+
metadata.XmpProfile ??= new XmpProfile(xmpData);
409406

410407
break;
411408
default:

0 commit comments

Comments
 (0)