<!-- IMPORTANT: 1. Support of Android 5.x - 6.x is finished. 2. Fill the template AFTER comments. --> **Problem description** <!-- A clear and concise description of what the problem is. You may post screenshots in addition to description. --> termux-dialog sheet crashes if no option is chosen **Steps to reproduce** <!-- Steps to reproduce the behavior. Please post all necessary commands that are needed to reproduce the issue. --> ```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** <!-- A clear and concise description of what you expected to happen. --> 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