New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
graphicsDevice.PlatformDispose throws System.NullReferenceException #6453
Comments
I ran into the same issue. The problem should be reproduceable in my MonoGame.WpfCore project. The exception occurs when the application is shutting down and the Here's the stack trace I got:
The problem is quite clear after stepping into the code. In the
But in other parts of the code it is consistently checked for
|
Fix issue #6453 - SwapChain is null in GraphicsDevice.PlatformDispose
After upgrade to monogame 3.7, I've got an NullReferenceException on calling graphicsDevice.Dispose, if monogame is used in a wpf application. Thats because, there is no _swapChain. The line is the first line @ PlatformDispose
"if (_swapChain.IsFullScreen)" <- Here should be checked whether _swapChain is not null
Before 3.7 that error not exists. I have testet on the latest dev branch on Windows 10 Prof.
What version of MonoGame does the bug occur on:
What operating system are you using:
What MonoGame platform are you using:
The text was updated successfully, but these errors were encountered: