mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-22 22:46:41 +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:
@@ -3207,7 +3207,7 @@ void BufferViewer::on_solidShading_currentIndexChanged(int index)
|
||||
m_Config.wireframeDraw = true;
|
||||
}
|
||||
|
||||
m_Config.solidShadeMode = (SolidShade)index;
|
||||
m_Config.solidShadeMode = (SolidShade)qMax(0, index);
|
||||
|
||||
m_ModelVSIn->setSecondaryColumn(m_ModelVSIn->secondaryColumn(),
|
||||
m_Config.solidShadeMode == SolidShade::Secondary,
|
||||
|
||||
Reference in New Issue
Block a user