[Scummvm-cvs-logs] SF.net SVN: scummvm:[48847] scummvm/trunk/engines/parallaction

peres001 at users.sourceforge.net peres001 at users.sourceforge.net
Thu Apr 29 01:11:35 CEST 2010


Revision: 48847
          http://scummvm.svn.sourceforge.net/scummvm/?rev=48847&view=rev
Author:   peres001
Date:     2010-04-28 23:11:34 +0000 (Wed, 28 Apr 2010)

Log Message:
-----------
Make sure dialogue manager is destroyed on quit.

Modified Paths:
--------------
    scummvm/trunk/engines/parallaction/dialogue.cpp
    scummvm/trunk/engines/parallaction/parallaction.cpp
    scummvm/trunk/engines/parallaction/parallaction.h

Modified: scummvm/trunk/engines/parallaction/dialogue.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/dialogue.cpp	2010-04-28 22:52:36 UTC (rev 48846)
+++ scummvm/trunk/engines/parallaction/dialogue.cpp	2010-04-28 23:11:34 UTC (rev 48847)
@@ -485,8 +485,7 @@
 	ZonePtr z = _dialogueMan->_z;
 
 	// destroy the _dialogueMan here
-	delete _dialogueMan;
-	_dialogueMan = 0;
+	destroyDialogueManager();
 
 	// run the lists saved
 	if (_cmdList) {
@@ -495,6 +494,12 @@
 	_cmdExec->run(z->_commands, z);
 }
 
+void Parallaction::destroyDialogueManager() {
+	// destroy the _dialogueMan here
+	delete _dialogueMan;
+	_dialogueMan = 0;
+}
+
 void Parallaction::runDialogueFrame() {
 	if (_input->_inputMode != Input::kInputModeDialogue) {
 		return;

Modified: scummvm/trunk/engines/parallaction/parallaction.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction.cpp	2010-04-28 22:52:36 UTC (rev 48846)
+++ scummvm/trunk/engines/parallaction/parallaction.cpp	2010-04-28 23:11:34 UTC (rev 48847)
@@ -57,7 +57,8 @@
 
 
 Parallaction::Parallaction(OSystem *syst, const PARALLACTIONGameDescription *gameDesc) :
-	Engine(syst), _gameDescription(gameDesc), _location(getGameType()) {
+	Engine(syst), _gameDescription(gameDesc), _location(getGameType()),
+	_dialogueMan(0) {
 
 	_vm = this;
 	DebugMan.addDebugChannel(kDebugDialogue, "dialogue", "Dialogues debug level");
@@ -81,6 +82,7 @@
 	delete _callableNames;
 	delete _cmdExec;
 	delete _programExec;
+	destroyDialogueManager();
 	delete _saveLoad;
 
 	cleanupGui();

Modified: scummvm/trunk/engines/parallaction/parallaction.h
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction.h	2010-04-28 22:52:36 UTC (rev 48846)
+++ scummvm/trunk/engines/parallaction/parallaction.h	2010-04-28 23:11:34 UTC (rev 48847)
@@ -341,6 +341,7 @@
 	void	allocateLocationSlot(const char *name);
 	void	finalizeLocationParsing();
 	void	showLocationComment(const Common::String &text, bool end);
+	void	destroyDialogueManager();
 
 public:
 	void	beep();


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list