File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -23,9 +23,10 @@ internal class GlfwPlatform : IWindowPlatform
23
23
(
24
24
( ) =>
25
25
{
26
+ GLFW . Glfw ? api = null ;
26
27
try
27
28
{
28
- GLFW . Glfw . GetApi ( ) ; // activate the class so we can determine if we can activate the class
29
+ api = GLFW . Glfw . GetApi ( ) ; // activate the class so we can determine if we can activate the class
29
30
}
30
31
catch ( Exception ex )
31
32
{
@@ -34,6 +35,10 @@ internal class GlfwPlatform : IWindowPlatform
34
35
#endif
35
36
return false ;
36
37
}
38
+ finally
39
+ {
40
+ api ? . Dispose ( ) ;
41
+ }
37
42
38
43
return true ;
39
44
}
Original file line number Diff line number Diff line change @@ -34,9 +34,10 @@ public static SdlPlatform GetOrRegister()
34
34
(
35
35
( ) =>
36
36
{
37
+ SDL . Sdl ? api = null ;
37
38
try
38
39
{
39
- SDL . Sdl . GetApi ( ) ;
40
+ api = SDL . Sdl . GetApi ( ) ;
40
41
}
41
42
catch ( Exception ex )
42
43
{
@@ -45,6 +46,10 @@ public static SdlPlatform GetOrRegister()
45
46
#endif
46
47
return false ;
47
48
}
49
+ finally
50
+ {
51
+ api ? . Dispose ( ) ;
52
+ }
48
53
49
54
return true ;
50
55
}
You can’t perform that action at this time.
0 commit comments