mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-24 17:05:37 +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)
|
||||
{
|
||||
lock (InitLock)
|
||||
{
|
||||
if (initialized)
|
||||
{
|
||||
platform_factory.Dispose();
|
||||
platform_factory = null;
|
||||
|
@ -175,6 +177,7 @@ namespace OpenTK
|
|||
initialized = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Print("OpenTK.Toolkit leaked, did you forget to call Dispose()?");
|
||||
|
|
Loading…
Reference in a new issue