Fixed NRE when calling Toolkit.Dispose() more than once.

This commit is contained in:
thefiddler 2014-03-11 16:00:25 +01:00
parent f5a4a4bd96
commit 6a3838757c

View file

@ -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()?");