mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 21:01:34 +08:00
fix the crash
This commit is contained in:
@ -380,9 +380,11 @@ export class View extends ViewCommon {
|
|||||||
@profile
|
@profile
|
||||||
public onUnloaded() {
|
public onUnloaded() {
|
||||||
if (this.touchListenerIsSet) {
|
if (this.touchListenerIsSet) {
|
||||||
this.nativeViewProtected.setOnTouchListener(null);
|
|
||||||
this.touchListenerIsSet = false;
|
this.touchListenerIsSet = false;
|
||||||
this.nativeViewProtected.setClickable(this._isClickable);
|
if (this.nativeViewProtected) {
|
||||||
|
this.nativeViewProtected.setOnTouchListener(null);
|
||||||
|
this.nativeViewProtected.setClickable(this._isClickable);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this._manager = null;
|
this._manager = null;
|
||||||
|
Reference in New Issue
Block a user