Skip to content

Commit 9a962bd

Browse files
authored
fix: back button in wavegen activity (#2275)
* fix:#2274 back btn in wavegen activity * fix:#2274 reformated
1 parent ea5b575 commit 9a962bd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/src/main/java/io/pslab/activity/WaveGeneratorActivity.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,8 @@ public boolean onCreateOptionsMenu(Menu menu) {
674674
public boolean onOptionsItemSelected(MenuItem item) {
675675
switch (item.getItemId()) {
676676
case android.R.id.home:
677-
produceSoundTask.cancel(true);
677+
if(produceSoundTask != null)
678+
produceSoundTask.cancel(true);
678679
produceSoundTask = null;
679680
isPlayingSound = false;
680681
finish();

0 commit comments

Comments
 (0)