dji-sdk / Mobile-UXSDK-Beta-Android

Mobile Android UXSDK Beta
MIT License
96 stars 55 forks source link

UnitModeListItemWidget causes exception to be thrown #58

Open bbenson09 opened 2 years ago

bbenson09 commented 2 years ago

When attempting to change the unit in the UnitModeListItemWidget, this error is thrown, causing the app to crash:

E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.flyby.pilot, PID: 14394
    java.lang.ClassCastException: java.lang.NullPointerException cannot be cast to dji.ux.beta.core.base.UXSDKError
        at dji.ux.beta.core.panel.listitem.unittype.UnitModeListItemWidget$onOptionTapped$2.accept(UnitModeListItemWidget.kt:171)
        at dji.ux.beta.core.panel.listitem.unittype.UnitModeListItemWidget$onOptionTapped$2.accept(UnitModeListItemWidget.kt:67)
        at dji.thirdparty.io.reactivex.internal.observers.CallbackCompletableObserver.onError(Unknown Source)
        at dji.thirdparty.io.reactivex.internal.observers.CallbackCompletableObserver.onComplete(Unknown Source)
        at dji.thirdparty.io.reactivex.internal.operators.completable.CompletableObserveOn$ObserveOnCompletableObserver.run(Unknown Source)
        at dji.thirdparty.io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run(Unknown Source)
        at android.os.Handler.handleCallback(Handler.java:755)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:167)
        at android.app.ActivityThread.main(ActivityThread.java:6240)
        at java.lang.reflect.Method.invoke(Native Method)