History

INtroduce range check for int value against the several enums we exposed through the js api for REnder and PErformance settings

Sam Gateau committed 7 years ago

Commit 9bc6c3b1 parent 34bae256 files · +10 −5Browse files

Showing the changes to interface/src/scripting/RenderScriptingInterface.cpp (1 of 6 files). Show all

Unified · Split

interface/src/scripting/RenderScriptingInterface.cpp+1−1
@@ -42,7 +42,7 @@ RenderScriptingInterface::RenderMethod RenderScriptingInterface::getRenderMethod · 41 unmodified lines
4242 }
4343
4444 void RenderScriptingInterface::setRenderMethod(RenderMethod renderMethod) {
45− if (_renderMethod != (int) renderMethod) {
45+ if (isValidRenderMethod(renderMethod) && (_renderMethod != (int) renderMethod)) {
4646 forceRenderMethod(renderMethod);
4747 emit settingsChanged();
4848 }