Lock in constructor for thread safety.
This commit is contained in:
parent
a1656c6830
commit
f3c028e5d2
1 changed files with 7 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue