mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 08:02:39 +08:00
fix potential crash due to null pointer (#13802)
* fix potential crash due to null pointer
This commit is contained in:
@@ -77,7 +77,7 @@ public class CocosSensorHandler implements SensorEventListener {
|
||||
}
|
||||
|
||||
public void disable() {
|
||||
if (mEnableSensor) {
|
||||
if (mEnableSensor && null != mSensorManager) {
|
||||
this.mSensorManager.unregisterListener(this);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user