Skip to content

Commit

Permalink
Merge pull request #3147 from 84n4n4/CATROID-175
Browse files Browse the repository at this point in the history
Catroid 175 - Fix concurrency issues in StageListener - to master
  • Loading branch information
wslany authored Mar 10, 2019
2 parents 224b1ff + cf08beb commit 58b0d2b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
4 changes: 2 additions & 2 deletions catroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@ android {
targetSdkVersion 26
applicationId appId
testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
versionCode 56
versionCode 57
println "VersionCode is $versionCode"
versionName "0.9.50"
versionName "0.9.52"
println "VersionName is $versionName"
buildConfigField "String", "GIT_COMMIT_INFO", "\"${getGitCommitInfo()}\""
buildConfigField "String", "MAIN_URL_HTTPS", (project.hasProperty('useWebTest') ? '"https://web-test.catrob.at"' : '"https://share.catrob.at"')
Expand Down
30 changes: 16 additions & 14 deletions catroid/src/main/java/org/catrobat/catroid/stage/StageListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -419,20 +419,6 @@ public void pause() {
}
}

public void finish() {
SoundManager.getInstance().clear();
PhysicsShapeBuilder.getInstance().reset();
if (CameraManager.getInstance() != null) {
CameraManager.getInstance().setToDefaultCamera();
}
if (penActor != null) {
penActor.dispose();
}

embroideryList = null;
finished = true;
}

@Override
public void render() {
if (CameraManager.getInstance() != null && CameraManager.getInstance().getState() == CameraManager.CameraState.previewRunning) {
Expand Down Expand Up @@ -589,8 +575,24 @@ public void dispose() {
disposeStageButKeepActors();
font.dispose();
axes.dispose();

disposeTextures();
disposeClonedSprites();

SoundManager.getInstance().clear();
PhysicsShapeBuilder.getInstance().reset();
embroideryList = null;
if (penActor != null) {
penActor.dispose();
}
}

public void finish() {
if (CameraManager.getInstance() != null) {
CameraManager.getInstance().setToDefaultCamera();
}

finished = true;
}

public boolean takeScreenshot(String screenshotName) {
Expand Down

0 comments on commit 58b0d2b

Please sign in to comment.