Skip to content

Commit f31d727

Browse files
authored
Merge pull request #8517 from gadfort/gui-conf-load
gui: ensure renderer settings can load after data type changes
2 parents bc7c253 + c77ccf7 commit f31d727

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/gui/include/gui/gui.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,11 @@ class Renderer
545545
T& value)
546546
{
547547
if (settings.count(key) == 1) {
548-
value = std::get<T>(settings.at(key));
548+
try {
549+
value = std::get<T>(settings.at(key));
550+
} catch (const std::bad_variant_access&) {
551+
// Stay with current value
552+
}
549553
}
550554
}
551555

0 commit comments

Comments
 (0)