diff --git a/doomsday/libdeng2/src/core/app.cpp b/doomsday/libdeng2/src/core/app.cpp index eb4f09b8a7..e6fae7f8dc 100644 --- a/doomsday/libdeng2/src/core/app.cpp +++ b/doomsday/libdeng2/src/core/app.cpp @@ -76,7 +76,7 @@ DENG2_PIMPL(App) /// The archive is owned by the file system. Archive *persistentData; - UnixInfo unixInfo; + QScopedPointer unixInfo; /// The configuration. Config *config; @@ -226,6 +226,8 @@ DENG2_PIMPL(App) App::App(NativePath const &appFilePath, QStringList args) : d(new Instance(this, args)) { + d->unixInfo.reset(new UnixInfo); + // Global time source for animations. Animation::setClock(&d->clock); @@ -334,7 +336,7 @@ NativePath App::nativePluginBinaryPath() path = DENG_LIBRARY_DIR; # endif // Also check the system config files. - d->unixInfo.path("libdir", path); + d->unixInfo->path("libdir", path); #endif return (d->cachedPluginBinaryPath = path); } @@ -401,7 +403,7 @@ NativePath App::nativeBasePath() path = DENG_BASE_DIR; # endif // Also check the system config files. - d->unixInfo.path("basedir", path); + d->unixInfo->path("basedir", path); #endif return (d->cachedBasePath = path); } @@ -518,6 +520,7 @@ bool App::appExists() App &App::app() { + DENG2_ASSERT(appExists()); return *singletonApp; } @@ -571,7 +574,7 @@ Config &App::config() UnixInfo &App::unixInfo() { - return DENG2_APP->d->unixInfo; + return *DENG2_APP->d->unixInfo; } } // namespace de