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_TOOL_WINDOW | wxNO_BORDER );
|
||||
|
||||
KIGFX::OPENGL_GAL* opengl_gal = new KIGFX::OPENGL_GAL( aOptions, testFrame );
|
||||
KIGFX::OPENGL_GAL* opengl_gal = nullptr;
|
||||
|
||||
try
|
||||
{
|
||||
opengl_gal = new KIGFX::OPENGL_GAL( aOptions, testFrame );
|
||||
|
||||
testFrame->Raise();
|
||||
testFrame->Show();
|
||||
|
||||
try
|
||||
{
|
||||
GAL_CONTEXT_LOCKER lock( opengl_gal );
|
||||
opengl_gal->init();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue