[light] Fix dangling reference in compute_color_mode causing memory corruption (#11868)

This commit is contained in:
J. Nick Koston authored and Jonathan Swoboda committed 2025-11-12 21:56:11 -05:00
1 parent ff107a0674
commit afed581079
3 files changed
+5 -3

No files matched your search

+1 -1
View File
@@ -406,7 +406,7 @@ void LightCall::transform_parameters_() {
}
}
ColorMode LightCall::compute_color_mode_() {
const auto &supported_modes = this->parent_->get_traits().get_supported_color_modes();
auto supported_modes = this->parent_->get_traits().get_supported_color_modes();
int supported_count = supported_modes.size();
// Some lights don't support any color modes (e.g. monochromatic light), leave it at unknown.