Skip to content

Commit

Permalink
chore(web): fix HBAO error when Cesium is destroyed (#675)
Browse files Browse the repository at this point in the history
  • Loading branch information
keiya01 committed Sep 11, 2023
1 parent ee4fade commit 5e41ba7
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -127,8 +127,10 @@ export const useOverrideGlobeShader = ({
defines: baseFragmentShaderSource.defines,
});
return () => {
// Reset customized shader to default
makeGlobeShadersDirty(globe);
if (!globe.isDestroyed()) {
// Reset customized shader to default
makeGlobeShadersDirty(globe);
}
};
}, [
sphericalHarmonicCoefficientsRefFunc,
Expand Down

0 comments on commit 5e41ba7

Please sign in to comment.