Lock in constructor for thread safety.

This commit is contained in:
the_fiddler 2008-01-25 10:20:25 +00:00
parent 534de7a266
commit 60138b2ff4

View file

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