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

@ -169,10 +169,13 @@ namespace OpenTK
{
lock (InitLock)
{
platform_factory.Dispose();
platform_factory = null;
toolkit = null;
initialized = false;
if (initialized)
{
platform_factory.Dispose();
platform_factory = null;
toolkit = null;
initialized = false;
}
}
}
else