mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-07-21 05:14:10 +00:00
Throw error when failing to create graphics context
This commit is contained in:
parent
d52d0d9640
commit
35b2d91fb3
1 changed files with 3 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
#include "sdlcursormanager.hpp"
|
#include "sdlcursormanager.hpp"
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
#include <stdexcept>
|
||||||
|
|
||||||
#include <SDL_mouse.h>
|
#include <SDL_mouse.h>
|
||||||
#include <SDL_endian.h>
|
#include <SDL_endian.h>
|
||||||
|
@ -48,6 +49,8 @@ namespace
|
||||||
|
|
||||||
traits->pbuffer = false;
|
traits->pbuffer = false;
|
||||||
_gc = osg::GraphicsContext::createGraphicsContext(traits.get());
|
_gc = osg::GraphicsContext::createGraphicsContext(traits.get());
|
||||||
|
if (!_gc)
|
||||||
|
throw std::runtime_error("Failed to create graphics context for image decompression");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_gc.valid())
|
if (_gc.valid())
|
||||||
|
|
Loading…
Reference in a new issue