Fix NRE in operator== and operator!=

This commit is contained in:
the_fiddler 2008-01-26 10:40:40 +00:00
parent 3ab17902de
commit 3fd9f2cc3a

View file

@ -129,6 +129,11 @@ namespace OpenTK.Graphics
public static bool operator== (DisplayResolution left, DisplayResolution right)
{
if (((object)left) == null && ((object)right) == null)
return true;
else if ((((object)left) == null && ((object)right) != null) ||
(((object)left) != null && ((object)right) == null))
return false;
return left.Equals(right);
}