mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-07-09 21:57:30 +00:00
Fixed NRE when calling Toolkit.Dispose() more than once.
This commit is contained in:
parent
f5a4a4bd96
commit
6a3838757c
|
@ -168,6 +168,8 @@ namespace OpenTK
|
||||||
if (manual)
|
if (manual)
|
||||||
{
|
{
|
||||||
lock (InitLock)
|
lock (InitLock)
|
||||||
|
{
|
||||||
|
if (initialized)
|
||||||
{
|
{
|
||||||
platform_factory.Dispose();
|
platform_factory.Dispose();
|
||||||
platform_factory = null;
|
platform_factory = null;
|
||||||
|
@ -175,6 +177,7 @@ namespace OpenTK
|
||||||
initialized = false;
|
initialized = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Print("OpenTK.Toolkit leaked, did you forget to call Dispose()?");
|
Debug.Print("OpenTK.Toolkit leaked, did you forget to call Dispose()?");
|
||||||
|
|
Loading…
Reference in a new issue