mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 09:00:44 +00:00
Clamp currentIndex from Qt which can come back as -1 in some cases
* If this gets propagated far enough and used as an index it can cause crashes, so we clamp to 0 when we know the value should be non-negative.
This commit is contained in:
@@ -149,7 +149,7 @@ void EnvironmentEditor::on_addUpdate_clicked()
|
||||
EnvironmentModification mod;
|
||||
mod.name = ui->name->text().toUtf8().data();
|
||||
mod.value = ui->value->text().toUtf8().data();
|
||||
mod.sep = (EnvSep)ui->separator->currentIndex();
|
||||
mod.sep = (EnvSep)qMax(0, ui->separator->currentIndex());
|
||||
|
||||
if(ui->appendValue->isChecked())
|
||||
mod.mod = EnvMod::Append;
|
||||
|
||||
Reference in New Issue
Block a user