File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed
src/SimulationFramework.SkiaSharp Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff 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 ,
You can’t perform that action at this time.
0 commit comments