mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:24:57 +00:00
LibAccelGfx+LibWeb+WebContent: Handle OpenGL Context init errors
Now, if OpenGL context fails, an error will be returned and a message printed, instead of crashing.
This commit is contained in:
parent
315c95a1ce
commit
980b61470c
4 changed files with 65 additions and 15 deletions
|
@ -72,7 +72,12 @@ PageClient::PageClient(PageHost& owner, u64 id)
|
|||
|
||||
#ifdef HAS_ACCELERATED_GRAPHICS
|
||||
if (s_use_gpu_painter) {
|
||||
m_accelerated_graphics_context = AccelGfx::Context::create();
|
||||
auto context = AccelGfx::Context::create();
|
||||
if (context.is_error()) {
|
||||
dbgln("Failed to create AccelGfx context: {}", context.error());
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
m_accelerated_graphics_context = AccelGfx::Context::create().release_value();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue