Skip to content
This repository has been archived by the owner on Oct 30, 2019. It is now read-only.

Commit

Permalink
Fix GDM disposal
Browse files Browse the repository at this point in the history
  • Loading branch information
flibitijibibo committed Aug 19, 2015
1 parent 7959e0a commit f65ebc7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Game.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ public GameWindow Window
(u, handler) => u.UpdateOrderChanged -= handler
);

private IGraphicsDeviceManager _graphicsDeviceManager;
private IGraphicsDeviceService _graphicsDeviceService;

private bool _initialized = false;
Expand Down Expand Up @@ -292,11 +291,11 @@ protected virtual void Dispose(bool disposing)
}


if (_graphicsDeviceManager != null)
if (_graphicsDeviceService != null)
{
// FIXME: Does XNA4 require the GDM to be disposable? -flibit
(_graphicsDeviceManager as IDisposable).Dispose();
_graphicsDeviceManager = null;
(_graphicsDeviceService as IDisposable).Dispose();
_graphicsDeviceService = null;
}

AudioDevice.Dispose();
Expand Down

0 comments on commit f65ebc7

Please sign in to comment.