mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-24 12:15:37 +00:00
Modified CreateX11WindowInfo to check GraphicsMode.Index.HasValue prior to using it.
This commit is contained in:
parent
5d5f598707
commit
7a8bfc60ee
|
@ -322,7 +322,11 @@ namespace OpenTK.Platform
|
|||
|
||||
// get the X11 Visual info for the display.
|
||||
Platform.X11.XVisualInfo info = new Platform.X11.XVisualInfo();
|
||||
info.VisualID = mode.Index;
|
||||
|
||||
if (!mode.Index.HasValue)
|
||||
throw new GraphicsModeException("Invalid or unsupported GraphicsMode.");
|
||||
|
||||
info.VisualID = mode.Index.Value;
|
||||
int dummy;
|
||||
window.VisualInfo = (Platform.X11.XVisualInfo)Marshal.PtrToStructure(
|
||||
Platform.X11.Functions.XGetVisualInfo(window.Display, Platform.X11.XVisualInfoMask.ID,
|
||||
|
|
Loading…
Reference in a new issue