@@ -2171,25 +2171,29 @@ class Renderer {
2171
2171
*/
2172
2172
dispose ( ) {
2173
2173
2174
- this . info . dispose ( ) ;
2175
- this . backend . dispose ( ) ;
2174
+ if ( this . _initialized === true ) {
2176
2175
2177
- this . _animation . dispose ( ) ;
2178
- this . _objects . dispose ( ) ;
2179
- this . _pipelines . dispose ( ) ;
2180
- this . _nodes . dispose ( ) ;
2181
- this . _bindings . dispose ( ) ;
2182
- this . _renderLists . dispose ( ) ;
2183
- this . _renderContexts . dispose ( ) ;
2184
- this . _textures . dispose ( ) ;
2176
+ this . info . dispose ( ) ;
2177
+ this . backend . dispose ( ) ;
2185
2178
2186
- if ( this . _frameBufferTarget !== null ) this . _frameBufferTarget . dispose ( ) ;
2179
+ this . _animation . dispose ( ) ;
2180
+ this . _objects . dispose ( ) ;
2181
+ this . _pipelines . dispose ( ) ;
2182
+ this . _nodes . dispose ( ) ;
2183
+ this . _bindings . dispose ( ) ;
2184
+ this . _renderLists . dispose ( ) ;
2185
+ this . _renderContexts . dispose ( ) ;
2186
+ this . _textures . dispose ( ) ;
2187
2187
2188
- Object . values ( this . backend . timestampQueryPool ) . forEach ( queryPool => {
2188
+ if ( this . _frameBufferTarget !== null ) this . _frameBufferTarget . dispose ( ) ;
2189
2189
2190
- if ( queryPool !== null ) queryPool . dispose ( ) ;
2190
+ Object . values ( this . backend . timestampQueryPool ) . forEach ( queryPool => {
2191
2191
2192
- } ) ;
2192
+ if ( queryPool !== null ) queryPool . dispose ( ) ;
2193
+
2194
+ } ) ;
2195
+
2196
+ }
2193
2197
2194
2198
this . setRenderTarget ( null ) ;
2195
2199
this . setAnimationLoop ( null ) ;
0 commit comments