diff options
author | Eugene Sandulenko | 2006-05-18 19:37:38 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2006-05-18 19:37:38 +0000 |
commit | 8e9db033791a3617051c9cb07492dec17154b2f7 (patch) | |
tree | 3a15ad1ae73e5a5001a1e8dcf46bb43877b74cce /engines/scumm/dialogs.cpp | |
parent | e98278228158a0a7aa69450bf44c912ac508a207 (diff) | |
download | scummvm-rg350-8e9db033791a3617051c9cb07492dec17154b2f7.tar.gz scummvm-rg350-8e9db033791a3617051c9cb07492dec17154b2f7.tar.bz2 scummvm-rg350-8e9db033791a3617051c9cb07492dec17154b2f7.zip |
Plug memory leak
svn-id: r22523
Diffstat (limited to 'engines/scumm/dialogs.cpp')
-rw-r--r-- | engines/scumm/dialogs.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp index bfe1e31a6b..fc13013c2b 100644 --- a/engines/scumm/dialogs.cpp +++ b/engines/scumm/dialogs.cpp @@ -820,6 +820,9 @@ InfoDialog::InfoDialog(ScummEngine *scumm, const String& message) void InfoDialog::setInfoText(const String& message) { _message = message; + // Width and height are dummy + _text = new StaticTextWidget(this, 4, 4, 10, 10, _message, kTextAlignCenter); + handleScreenChanged(); } @@ -835,7 +838,7 @@ void InfoDialog::handleScreenChanged() { _x = (screenW - width) / 2; _y = (screenH - height) / 2; - new StaticTextWidget(this, 4, 4, _w - 8, _h, _message, kTextAlignCenter); + _text->setSize(_w - 8, _h); } const Common::String InfoDialog::queryResString(int stringno) { |