Skip to content

Commit

Permalink
捕获异常;判断如果正在运行才去释放画布 #17
Browse files Browse the repository at this point in the history
  • Loading branch information
xujiaji committed May 6, 2019
1 parent 6a432d1 commit 5edca45
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 31 deletions.
29 changes: 0 additions & 29 deletions .idea/codeStyles/Project.xml

This file was deleted.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ void draw(float value, boolean isOnlyClear) {
} catch (Exception e) {
LogUtil.i(e.getMessage());
} finally {
if (canvas != null) {
if (canvas != null && isRunning) {
mSurfaceProxy.unlockCanvasAndPost(canvas);
}
}
Expand Down Expand Up @@ -394,6 +394,7 @@ public void start() {
}

public void prepare() {
if (isRunning) return;
if (isPause) {
isPause = false;
isRunning = true;
Expand Down

0 comments on commit 5edca45

Please sign in to comment.