aboutsummaryrefslogtreecommitdiff
path: root/graphics/macgui/macwindowmanager.h
diff options
context:
space:
mode:
authorEugene Sandulenko2017-07-30 09:18:42 +0200
committerEugene Sandulenko2017-08-01 10:42:21 +0200
commit645ee64da0f837245443842d53621e8fd5ac924f (patch)
treea9d0e6fe46e23b73ca015a47fdf2a64a11d92c24 /graphics/macgui/macwindowmanager.h
parent73b6b12cbb926c2e21020afa4a984bbeaeac3db6 (diff)
downloadscummvm-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.h7
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