Skip to content

Commit

Permalink
Bugfix: Calling ApplyChanges() in Game actor cause Exception
Browse files Browse the repository at this point in the history
Reported as MonoGame#5173 (MonoGame#5173)

This is a temp fix. Calling ApplyChanges() should create the graphics
Device anytime.
  • Loading branch information
nkast committed Mar 23, 2019
1 parent fde4fe0 commit 6ee97b3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions MonoGame.Framework/GraphicsDeviceManager.cs
Expand Up @@ -293,6 +293,10 @@ private void PrepareGraphicsDeviceInformation(GraphicsDeviceInformation gdi)
/// </summary>
public void ApplyChanges()
{
#if WINDOWS_UAP || (W81 || WP81)
if (_graphicsDevice == null)
return;
#endif
// If the device hasn't been created then create it now.
if (_graphicsDevice == null)
CreateDevice();
Expand Down

0 comments on commit 6ee97b3

Please sign in to comment.