Skip to content
Snippets Groups Projects
V

vairdraw-src

Project ID: 1823
sdegrande's avatar
sdegrande authored
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.
d3879a6b
History
Name Last commit Last update