diff options
author | Eugene Sandulenko | 2017-07-30 09:18:42 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2017-08-01 10:42:21 +0200 |
commit | 645ee64da0f837245443842d53621e8fd5ac924f (patch) | |
tree | a9d0e6fe46e23b73ca015a47fdf2a64a11d92c24 /graphics/macgui/macwindowmanager.h | |
parent | 73b6b12cbb926c2e21020afa4a984bbeaeac3db6 (diff) | |
download | scummvm-rg350-645ee64da0f837245443842d53621e8fd5ac924f.tar.gz scummvm-rg350-645ee64da0f837245443842d53621e8fd5ac924f.tar.bz2 scummvm-rg350-645ee64da0f837245443842d53621e8fd5ac924f.zip |
GRAPHICS: MACGUI: Avoid double free of MacTextWindow
Diffstat (limited to 'graphics/macgui/macwindowmanager.h')
-rw-r--r-- | graphics/macgui/macwindowmanager.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/graphics/macgui/macwindowmanager.h b/graphics/macgui/macwindowmanager.h index 61f4899481..963fc358dd 100644 --- a/graphics/macgui/macwindowmanager.h +++ b/graphics/macgui/macwindowmanager.h @@ -116,10 +116,15 @@ public: */ void addWindowInitialized(MacWindow *macwindow); /** + * Returns the last allocated id + * @return last allocated window id + */ + int getLastId() { return _lastId; } + /** * Returns the next available id and the increments the internal counter. * @return next (new) window id that can be used */ - int getNextId(); + int getNextId() { return _lastId++; } /** * Add the menu to the desktop. * Note that the returned menu is empty, and therefore must be filled |