diff --git a/src/Graphics/GraphicsDevice.cs b/src/Graphics/GraphicsDevice.cs index 0f9fcbb..97fd954 100644 --- a/src/Graphics/GraphicsDevice.cs +++ b/src/Graphics/GraphicsDevice.cs @@ -29,6 +29,11 @@ namespace MoonWorks.Graphics { Backend = (Backend) Refresh.Refresh_SelectBackend((Refresh.Backend) preferredBackend, out windowFlags); + if (Backend == Backend.Invalid) + { + throw new System.Exception("Could not set graphics backend!"); + } + Handle = Refresh.Refresh_CreateDevice( Conversions.BoolToByte(debugMode) );