Lock in constructor for thread safety.

This commit is contained in:
the_fiddler 2008-01-25 10:20:25 +00:00
parent a1656c6830
commit f3c028e5d2

View file

@ -69,9 +69,13 @@ namespace OpenTK.Graphics
this.current_resolution = currentResolution;
this.primary = primary;
this.available_resolutions.AddRange(availableResolutions);
available_displays.Add(this);
if (primary)
primary_display = this;
lock (display_lock)
{
available_displays.Add(this);
if (primary)
primary_display = this;
}
}
#endregion