mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-26 16:55:39 +00:00
Fixed a NRE.
This commit is contained in:
parent
15956016b4
commit
8b14881538
|
@ -22,7 +22,7 @@ namespace OpenTK.Platform.X11
|
||||||
{
|
{
|
||||||
private IntPtr context;
|
private IntPtr context;
|
||||||
private DisplayMode mode;
|
private DisplayMode mode;
|
||||||
private WindowInfo windowInfo;
|
private WindowInfo windowInfo = new WindowInfo();
|
||||||
private IntPtr visual;
|
private IntPtr visual;
|
||||||
|
|
||||||
private bool disposed;
|
private bool disposed;
|
||||||
|
@ -88,6 +88,7 @@ namespace OpenTK.Platform.X11
|
||||||
visualAttributes.Add((int)0);
|
visualAttributes.Add((int)0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
windowInfo.CopyInfoFrom(info);
|
||||||
visual = Glx.ChooseVisual(((X11.WindowInfo)info).Display, ((X11.WindowInfo)info).Screen, visualAttributes.ToArray());
|
visual = Glx.ChooseVisual(((X11.WindowInfo)info).Display, ((X11.WindowInfo)info).Screen, visualAttributes.ToArray());
|
||||||
if (visual == IntPtr.Zero)
|
if (visual == IntPtr.Zero)
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue