Skip to content

Commit 8396cd8

Browse files
committed
fatal type
1 parent 29be0bd commit 8396cd8

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/SimulationFramework.SkiaSharp/SkiaTexture.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,7 @@ public SKSurface GetSurface()
182182
public SKImage GetImage()
183183
{
184184
if (IsDisposed)
185-
186-
if (IsDisposed)
187-
throw new InvalidOperationException("Cannot use disposed texture!");
188-
throw new InvalidOperationException("Cannot use disposed texture!");
185+
throw new InvalidOperationException("Cannot use disposed texture!");
189186

190187
return image;
191188
}
@@ -200,9 +197,6 @@ public uint GetGLTexture()
200197

201198
public void Encode(Stream destination, TextureEncoding encoding)
202199
{
203-
if (IsDisposed)
204-
throw new InvalidOperationException("Cannot use disposed texture!");
205-
206200
var data = image.Encode(encoding switch
207201
{
208202
TextureEncoding.PNG => SKEncodedImageFormat.Png,

0 commit comments

Comments
 (0)