angular-ui/ng-grid — pull request #1133 by mikeromano38 (2014-04-23 04:49:12+00:00)
Title: check for null references on $destroy and updateGridLayout

This is a proposed fix for https://github.com/angular-ui/ng-grid/issues/1130 ( admittedly hacky )

It's defensive in nature and just checks if references are null before calling a method on them. I was running into instances where on routeChange, $destroy was being called several times and throwing an error.