diff options
author | Torbjörn Andersson | 2006-09-07 16:13:41 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2006-09-07 16:13:41 +0000 |
commit | fb27c5897740da1da65d7c5e0bf67dee0bab82aa (patch) | |
tree | 03c80287deab78f85c859b5dae1ccd8efb480c23 /engines/agi | |
parent | fa8f6e528b48e3a1e9e2d550b36302794ffa73b2 (diff) | |
download | scummvm-rg350-fb27c5897740da1da65d7c5e0bf67dee0bab82aa.tar.gz scummvm-rg350-fb27c5897740da1da65d7c5e0bf67dee0bab82aa.tar.bz2 scummvm-rg350-fb27c5897740da1da65d7c5e0bf67dee0bab82aa.zip |
Don't create a second Menu object unless the first one has been deleted. This
seems to fix bug #1553513 ("AGI: Crash after restart").
svn-id: r23833
Diffstat (limited to 'engines/agi')
-rw-r--r-- | engines/agi/agi.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp index aa17ba1fa3..2c083959de 100644 --- a/engines/agi/agi.cpp +++ b/engines/agi/agi.cpp @@ -311,7 +311,9 @@ int agi_init() { init_words(); - menu = new Menu(); + if (!menu) + menu = new Menu(); + init_pri_table(); /* clear string buffer */ @@ -522,6 +524,7 @@ void AgiEngine::initialize() { game.sbuf = (uint8 *) calloc(_WIDTH, _HEIGHT); game.hires = (uint8 *) calloc(_WIDTH * 2, _HEIGHT); + menu = 0; _sprites = new SpritesMan; _text = new TextMan; init_video(); |