Browse Source

Do not crash if puglNewWorld fails

Signed-off-by: falkTX <falktx@falktx.com>
pull/272/head
falkTX 4 years ago
parent
commit
a53248a652
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 7 additions and 4 deletions
  1. +7
    -4
      dgl/src/ApplicationPrivateData.cpp

+ 7
- 4
dgl/src/ApplicationPrivateData.cpp View File

@@ -78,11 +78,14 @@ void Application::PrivateData::oneWindowHidden() noexcept

void Application::PrivateData::idle(const uint timeoutInMs)
{
const double timeoutInSeconds = timeoutInMs != 0
? static_cast<double>(timeoutInMs) / 1000.0
: 0.0;
if (world != nullptr)
{
const double timeoutInSeconds = timeoutInMs != 0
? static_cast<double>(timeoutInMs) / 1000.0
: 0.0;

puglUpdate(world, timeoutInSeconds);
puglUpdate(world, timeoutInSeconds);
}

#ifndef DPF_TEST_APPLICATION_CPP
for (std::list<Window*>::iterator it = windows.begin(), ite = windows.end(); it != ite; ++it)


Loading…
Cancel
Save