-
- Downloads
Fix use of std::optional
The spec mentions that if a std::optional does not contain a value, then the behavior of std::optional::operator*() is undefined. Up to now, we did not check the state of an optional before to call operator*(). This is a bad use, but there was no issue. Something was changed with the libstdc++ provided with gcc15, and now VAirDraw crashes when calling operator*() on a void optional. With this patch, we check if an optional has a value before to get its value.
Showing
- src/HardwareSet/OpenXRSet/OpenXRInput.cpp 2 additions, 2 deletionssrc/HardwareSet/OpenXRSet/OpenXRInput.cpp
- src/HardwareSet/OpenXRSet/OpenXRInput.hpp 11 additions, 11 deletionssrc/HardwareSet/OpenXRSet/OpenXRInput.hpp
- src/HardwareSet/OpenXRSet/OpenXRSet.cpp 39 additions, 29 deletionssrc/HardwareSet/OpenXRSet/OpenXRSet.cpp
- src/HardwareSet/OpenXRSet/OpenXR_helpers.cpp 11 additions, 7 deletionssrc/HardwareSet/OpenXRSet/OpenXR_helpers.cpp
- tools/cap_modder.cpp 4 additions, 4 deletionstools/cap_modder.cpp
Loading
Please register or sign in to comment