VIewer.Destroy crashes

Viewer.destroy() throws an exception.

In the default Sandcastle, the following javascript code demonstrates:

        var viewer = new Cesium.Viewer('cesiumContainer');

        setTimeout(function() { viewer.destroy(); } , 1000);

The exception:

    "Unable to get property 'destroy' of undefined or null reference (on line 2071 of"

The busted line of code:


Fix that is working for me:

        if (this._globeDepth) {

Thanks for reporting this. However, I was not able to reproduce it in master. What browser were you using?

I think this was fixed in master a few weeks ago:

I’m using IE11

Scott is right, this is definitely fixed in master. 1.12 will be released with the fix on August 3rd.

Cool, thanks