mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-15 00:05:06 +00:00
obs/gs/helper: Throw exception if we aren't in a context
This commit is contained in:
parent
b2dd816ff2
commit
b57c7975e3
1 changed files with 2 additions and 0 deletions
|
@ -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()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue