Fixed an issue where extreme controller input in GuiThemeDownloader could crash the application

This commit is contained in:
Leon Styhre 2023-03-31 21:50:14 +02:00
parent 82fd96580e
commit 4fcd956156

View file

@ -899,6 +899,9 @@ void GuiThemeDownloader::onSizeChanged()
bool GuiThemeDownloader::input(InputConfig* config, Input input)
{
if (mFetching && input.value)
return false;
if (mFullscreenViewing && input.value) {
if (config->isMappedLike("left", input)) {
if (mFullscreenViewerIndex > 0)
@ -919,7 +922,7 @@ bool GuiThemeDownloader::input(InputConfig* config, Input input)
}
}
if (config->isMappedTo("b", input) && input.value && !mFetching) {
if (config->isMappedTo("b", input) && input.value) {
delete this;
return true;
}