src/ai/api/ai_transactionmode.cpp
branchnoai
changeset 11007 d57c2e53679b
parent 9833 89a64246458f
equal deleted inserted replaced
11002:3a11ba88eb7c 11007:d57c2e53679b
    37 	this->SetDoCommandMode(&AITransactionMode::ModeProc, this);
    37 	this->SetDoCommandMode(&AITransactionMode::ModeProc, this);
    38 }
    38 }
    39 
    39 
    40 AITransactionMode::~AITransactionMode()
    40 AITransactionMode::~AITransactionMode()
    41 {
    41 {
       
    42 	assert(this->GetDoCommandModeInstance() == this);
    42 	this->SetDoCommandMode(this->last_mode, this->last_instance);
    43 	this->SetDoCommandMode(this->last_mode, this->last_instance);
    43 
    44 
    44 	/* Clean up the command_stack nicely (as in: free the cmd_text) */
    45 	/* Clean up the command_stack nicely (as in: free the cmd_text) */
    45 	AITransactionModeCommand command;
    46 	AITransactionModeCommand command;
    46 	while (!this->command_stack.empty()) {
    47 	while (!this->command_stack.empty()) {