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) lock (InitLock)
{ {
platform_factory.Dispose(); if (initialized)
platform_factory = null; {
toolkit = null; platform_factory.Dispose();
initialized = false; platform_factory = null;
toolkit = null;
initialized = false;
}
} }
} }
else else