Skip to content

Commit

Permalink
fix: remove view only if attached
Browse files Browse the repository at this point in the history
  • Loading branch information
Xtr126 committed Feb 20, 2024
1 parent 979b1f3 commit b844486
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/src/main/java/xtr/keymapper/TouchPointer.java
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ private void connectRemoteService(KeymapProfile profile) {
@Override
public void onDestroy() {
if (cursorView != null) {
mWindowManager.removeView(cursorView);
if (cursorView.isAttachedToWindow())
mWindowManager.removeView(cursorView);
cursorView.invalidate();
}
if (mService != null) try {
Expand Down

0 comments on commit b844486

Please sign in to comment.