Skip to content

Commit f2e1300

Browse files
Merge pull request #403 from Thomvl/fix/appclosecleanup
Add condition for c2d upon app close
2 parents dfd0dd0 + 2301c49 commit f2e1300

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/startApp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ const getSettings = () => {
112112
if (stage.gl) {
113113
stage.gl.clearColor(0.0, 0.0, 0.0, 0.0)
114114
stage.gl.clear(stage.gl.COLOR_BUFFER_BIT)
115-
} else {
115+
} else if(stage.c2d) {
116116
stage.c2d.clearRect(0, 0, canvas.width, canvas.height)
117117
}
118118
}

support/startApp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ var getSettings = function getSettings() {
185185
if (stage.gl) {
186186
stage.gl.clearColor(0.0, 0.0, 0.0, 0.0);
187187
stage.gl.clear(stage.gl.COLOR_BUFFER_BIT);
188-
} else {
188+
} else if(stage.c2d) {
189189
stage.c2d.clearRect(0, 0, canvas.width, canvas.height);
190190
}
191191
} // cleanup

0 commit comments

Comments
 (0)