|
@@ -582,12 +582,13 @@ void printInfoAboutIntObject(const CIntObject *obj, int level)
|
|
|
void removeGUI()
|
|
void removeGUI()
|
|
|
{
|
|
{
|
|
|
// CClient::endGame
|
|
// CClient::endGame
|
|
|
- GH.curInt = nullptr;
|
|
|
|
|
- if(GH.topInt())
|
|
|
|
|
- GH.topInt()->deactivate();
|
|
|
|
|
- GH.listInt.clear();
|
|
|
|
|
- GH.objsToBlit.clear();
|
|
|
|
|
- GH.statusbar = nullptr;
|
|
|
|
|
|
|
+ GH.curInt = nullptr;
|
|
|
|
|
+ if(GH.topInt())
|
|
|
|
|
+ GH.topInt()->deactivate();
|
|
|
|
|
+ adventureInt = nullptr;
|
|
|
|
|
+ GH.listInt.clear();
|
|
|
|
|
+ GH.objsToBlit.clear();
|
|
|
|
|
+ GH.statusbar = nullptr;
|
|
|
logGlobal->info("Removed GUI.");
|
|
logGlobal->info("Removed GUI.");
|
|
|
|
|
|
|
|
LOCPLINT = nullptr;
|
|
LOCPLINT = nullptr;
|
|
@@ -1570,13 +1571,21 @@ void handleQuit(bool ask)
|
|
|
{
|
|
{
|
|
|
logConfig->deconfigure();
|
|
logConfig->deconfigure();
|
|
|
delete logConfig;
|
|
delete logConfig;
|
|
|
- logConfig = nullptr;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- std::cout << "Ending...\n";
|
|
|
|
|
- exit(0);
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
|
|
+ logConfig = nullptr;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ std::cout << "Ending...\n";
|
|
|
|
|
+
|
|
|
|
|
+ // Workaround for assertion failure on exit:
|
|
|
|
|
+ // handleQuit() is alway called during SDL event processing
|
|
|
|
|
+ // during which, eventsM is kept locked
|
|
|
|
|
+ // this leads to assertion failure if boost::mutex is in locked state
|
|
|
|
|
+ eventsM.unlock();
|
|
|
|
|
+
|
|
|
|
|
+ exit(0);
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
if(CSH->client && LOCPLINT && ask)
|
|
if(CSH->client && LOCPLINT && ask)
|
|
|
{
|
|
{
|
|
|
CCS->curh->changeGraphic(ECursor::ADVENTURE, 0);
|
|
CCS->curh->changeGraphic(ECursor::ADVENTURE, 0);
|