mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-22 00:03:51 +02:00
Delete screenshot metadata
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
@@ -43,7 +43,7 @@ public class PNGFile : IDisposable
|
||||
ReadAndCacheMetadata();
|
||||
|
||||
var chunk = metadataChunkCache.FirstOrDefault((chunk) => chunkTypeFilter.HasFlag(chunk.ChunkTypeEnum));
|
||||
if (chunk.IsZero())
|
||||
if (chunk == null || chunk.IsZero())
|
||||
return null;
|
||||
|
||||
return chunk;
|
||||
@@ -60,7 +60,7 @@ public class PNGFile : IDisposable
|
||||
public PNGChunk? GetChunkReverse(PNGChunkTypeFilter chunkTypeFilter)
|
||||
{
|
||||
var chunk = ReadChunkReverse(chunkTypeFilter);
|
||||
if (chunk != null && chunk.IsZero())
|
||||
if (chunk == null || chunk.IsZero())
|
||||
return null;
|
||||
|
||||
return chunk;
|
||||
|
||||
Reference in New Issue
Block a user