Pārlūkot izejas kodu

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

pull/482/head
Matthew Petroff pirms 7 gadiem
vecāks
revīzija
508a21044f
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. +2
    -2
      src/js/libpannellum.js

+ 2
- 2
src/js/libpannellum.js Parādīt failu

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


Notiek ielāde…
Atcelt
Saglabāt