Fixed an issue where aborting input configuration when using the --force-input-config command line option would crash the application.

This commit is contained in:
Leon Styhre 2023-02-19 14:32:22 +01:00
parent 6c3f5e70bd
commit 786d8bd57c

View file

@ -107,6 +107,8 @@ bool GuiDetectDevice::input(InputConfig* config, Input input)
{
if (!mFirstRun && input.device == DEVICE_KEYBOARD && input.type == TYPE_KEY && input.value &&
input.id == SDLK_ESCAPE) {
if (mDoneCallback)
mDoneCallback();
// Cancel the configuration.
delete this; // Delete GUI element.
return true;