Problem description
termux-dialog sheet crashes if no option is chosen
Steps to reproduce
termux-dialog sheet -v 'Item One','Item Two' will crash if the user clicks out of the dialog prompt (choosing neither one nor two)
Expected behavior
I believe that it used to properly output -1 in the json index like this:
{
"code": -1,
"text": "",
"index": -1
}
Additional information
- termux-api application version: 0.50.1 (51)
- termux-api package version (installed through apt): 0.57
- Android OS version: 11
- Device model: moto g play (XT2093DL)
- target-sdk: 28
Copied from crash_log.md
Crash Message:
Attempt to invoke virtual method 'android.os.IBinder android.view.View.getWindowToken()' on a null object reference
The stacktrace is long so I won't post unless its needed