Added catch for handling cases where undefined settings for dislayNum and screenNum are used

This commit is contained in:
Robert Osfield
2008-01-04 13:57:36 +00:00
parent 1bfb630137
commit 35d9107d81
2 changed files with 20 additions and 2 deletions

View File

@@ -55,7 +55,12 @@ GraphicsContext::WindowingSystemInterface* GraphicsContext::getWindowingSystemIn
GraphicsContext* GraphicsContext::createGraphicsContext(Traits* traits)
{
if (s_WindowingSystemInterface.valid())
{
// catch any undefined values.
if (traits) traits->setUndefinedScreenDetailsToDefaultScreen();
return s_WindowingSystemInterface->createGraphicsContext(traits);
}
else
return 0;
}