浏览代码

Fix bug when `destroy()` is called twice (fixes #468).

pull/482/head
Matthew Petroff 7 年前
父节点
当前提交
508a21044f
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      src/js/libpannellum.js

+ 2
- 2
src/js/libpannellum.js 查看文件

@@ -422,10 +422,10 @@ function Renderer(container) {
*/
this.destroy = function() {
if (container !== undefined) {
if (canvas !== undefined) {
if (canvas !== undefined && container.contains(canvas)) {
container.removeChild(canvas);
}
if (world !== undefined) {
if (world !== undefined && container.contains(world)) {
container.removeChild(world);
}
}


正在加载...
取消
保存