Fix CA2216
This commit is contained in:
@@ -45,6 +45,12 @@ namespace OpenRA.Platforms.Default
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
void Dispose(bool _)
|
||||
{
|
||||
if (Cursor != IntPtr.Zero)
|
||||
{
|
||||
@@ -58,5 +64,10 @@ namespace OpenRA.Platforms.Default
|
||||
surface = IntPtr.Zero;
|
||||
}
|
||||
}
|
||||
|
||||
~Sdl2HardwareCursor()
|
||||
{
|
||||
Dispose(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user