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 Jul 27, 2022
1 parent 4b94b20 commit 0c41560
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions MonoGame.Framework/GraphicsDeviceManager.cs
Expand Up @@ -416,6 +416,11 @@ private void CreateDevice_SDLNew()
/// </summary>
public void ApplyChanges()
{
#if WINDOWS_UAP
if (_graphicsDevice == null)
return;
#endif

// If the device hasn't been created then create it now.
if (_strategy.GraphicsDevice == null)
CreateDevice();
Expand Down

0 comments on commit 0c41560

Please sign in to comment.