mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-24 16:15:28 +00:00
Fixed potential NRE during extension loading.
This commit is contained in:
parent
25fac6226d
commit
9912691bd5
|
@ -158,7 +158,7 @@ namespace OpenTK.Platform
|
|||
|
||||
Delegate old = f.GetValue(null) as Delegate;
|
||||
Delegate @new = LoadDelegate(f.Name, f.FieldType);
|
||||
if (old.Target != @new.Target)
|
||||
if ((old != null ? old.Target : null) != (@new != null ? @new.Target : null))
|
||||
{
|
||||
f.SetValue(null, @new);
|
||||
FieldInfo rebuildExtensionList = type.GetField("rebuildExtensionList", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public);
|
||||
|
|
Loading…
Reference in a new issue