Resolve bug segfault

This commit is contained in:
Pcornat 2026-01-07 23:45:05 +01:00
commit c5eb129109
Signed by: Pcornat
GPG key ID: E0326CC678A00BDD
2 changed files with 4 additions and 4 deletions

View file

@ -71,7 +71,7 @@ namespace gui {
Window &operator=(const Window &) = delete;
Window &operator=(Window &&other) noexcept;
Window &operator=(Window other) noexcept;
};
void color_10_bits() noexcept;

View file

@ -89,9 +89,9 @@ namespace gui {
glfwMakeContextCurrent(wwindow.get());
}
Window &Window::operator=(Window &&other) noexcept {
wwindow = std::move(other.wwindow);
modules = std::move(other.modules);
Window &Window::operator=(Window other) noexcept {
std::swap(wwindow, other.wwindow);
std::swap(modules, other.modules);
glfwSetWindowUserPointer(wwindow.get(), &modules);
return *this;
}