mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 04:41:36 +08:00
fix the crash
This commit is contained in:
@ -380,11 +380,13 @@ 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;
|
||||||
this._rootManager = null;
|
this._rootManager = null;
|
||||||
super.onUnloaded();
|
super.onUnloaded();
|
||||||
|
Reference in New Issue
Block a user