diff --git a/source/obs/gs/gs-helper.hpp b/source/obs/gs/gs-helper.hpp index 437920fc..ccb12f9c 100644 --- a/source/obs/gs/gs-helper.hpp +++ b/source/obs/gs/gs-helper.hpp @@ -28,6 +28,8 @@ namespace gs { inline context() { obs_enter_graphics(); + if (gs_get_context() == nullptr) + throw std::runtime_error("Failed to enter graphics context."); } ~context() {