Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3253


Ignore:
Timestamp:
Jun 29, 2009, 10:00:40 PM (15 years ago)
Author:
rgrieder
Message:

Minor fixes and changes.

Location:
code/branches/core4
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core4/cmake/BuildConfigMSVC.cmake

    r3196 r3253  
    3535
    3636# Currently VLD has a problem with MSVC9 although it actually is supported
    37 IF(MSVC8)
     37IF(MSVC80)
    3838  OPTION(VISUAL_LEAK_DETECTOR_ENABLE "Memory leak detector" off)
    3939ENDIF()
  • code/branches/core4/src/core/Core.cc

    r3248 r3253  
    229229    Core::Core(int argc, char** argv)
    230230    {
    231         assert(Core::singletonRef_s == 0);
     231        if (singletonRef_s != 0)
     232        {
     233            COUT(0) << "Error: The Core singleton cannot be recreated! Shutting down." << std::endl;
     234            abort();
     235        }
    232236        Core::singletonRef_s = this;
    233237
     
    264268        int limitToCPU = CommandLine::getValue("limitToCPU");
    265269        if (limitToCPU > 0)
    266             setThreadAffinity((unsigned int)limitToCPU);
     270            setThreadAffinity(static_cast<unsigned int>(limitToCPU));
    267271
    268272        // Manage ini files and set the default settings file (usually orxonox.ini)
     
    271275            CommandLine::getValue("settingsFile").getString());
    272276
     277        // Required as well for the config values
    273278        this->languageInstance_ = new Language();
    274279
     
    308313        // Also delete external console command that don't belong to an Identifier
    309314        CommandExecutor::destroyExternalCommands();
    310 
    311315        // Clean up class hierarchy stuff (identifiers, XMLPort, configValues, consoleCommand)
    312316        Identifier::destroyAllIdentifiers();
    313317
    314         assert(Core::singletonRef_s);
    315         Core::singletonRef_s = 0;
    316318        delete this->signalHandler_;
     319
     320        // Don't assign singletonRef_s with NULL! Recreation is not supported
    317321    }
    318322
  • code/branches/core4/src/orxonox/Main.cc

    r3247 r3253  
    8888
    8989    game->run();
     90    delete game;
    9091
    9192    return 0;
Note: See TracChangeset for help on using the changeset viewer.