Don't crash if window creation fails due to selected renderer.

This commit is contained in:
Pieter-Jan Briers
2021-05-03 23:37:41 +02:00
parent bf4aead1e8
commit a0c0a722c9

View File

@@ -492,6 +492,10 @@ namespace Robust.Client.Graphics.Clyde
parameters.Fullscreen ? monitor : null,
contextShare);
// Check if window failed to create.
if (window == null)
return null;
if (parameters.Maximized)
{
GLFW.GetMonitorPos(monitor, out var x, out var y);