protected override void Dispose(bool disposing)
{
if (disposing)
{
// unregister event handlers
try
{
inputService.GetKeyboard().KeyPressed -= KeyPressed;
}
// our input service disposed before we did... a dirty hack
catch (NullReferenceException e)
{
Log.Error(e.Message);
Log.Error(e.StackTrace);
}
}
base.Dispose(disposing);
}