Wrap CTOR in try/catch for context errors
This commit is contained in:
parent
50b05aea4a
commit
945faba586
|
@ -332,13 +332,15 @@ wxString OPENGL_GAL::CheckFeatures( GAL_DISPLAY_OPTIONS& aOptions )
|
||||||
wxFrame* testFrame = new wxFrame( NULL, wxID_ANY, wxT( "" ), wxDefaultPosition, wxSize( 1, 1 ),
|
wxFrame* testFrame = new wxFrame( NULL, wxID_ANY, wxT( "" ), wxDefaultPosition, wxSize( 1, 1 ),
|
||||||
wxFRAME_TOOL_WINDOW | wxNO_BORDER );
|
wxFRAME_TOOL_WINDOW | wxNO_BORDER );
|
||||||
|
|
||||||
KIGFX::OPENGL_GAL* opengl_gal = new KIGFX::OPENGL_GAL( aOptions, testFrame );
|
KIGFX::OPENGL_GAL* opengl_gal = nullptr;
|
||||||
|
|
||||||
testFrame->Raise();
|
|
||||||
testFrame->Show();
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
opengl_gal = new KIGFX::OPENGL_GAL( aOptions, testFrame );
|
||||||
|
|
||||||
|
testFrame->Raise();
|
||||||
|
testFrame->Show();
|
||||||
|
|
||||||
GAL_CONTEXT_LOCKER lock( opengl_gal );
|
GAL_CONTEXT_LOCKER lock( opengl_gal );
|
||||||
opengl_gal->init();
|
opengl_gal->init();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue