mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 03:50:39 +00:00
Bugfix ... remove deallocated object from map.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18002 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6aef871f82
commit
e1fd264d4f
2 changed files with 27 additions and 2 deletions
|
@ -241,6 +241,25 @@ GSCurrentServer(void)
|
|||
|
||||
- (void) dealloc
|
||||
{
|
||||
NSMapEnumerator enumerator;
|
||||
void *key;
|
||||
void *val;
|
||||
|
||||
/*
|
||||
* Remove the display server from the windows map.
|
||||
* This depends on a property of GNUstep map tables, that an
|
||||
* enumerated object can safely be removed from the map.
|
||||
*/
|
||||
enumerator = NSEnumerateMapTable(windowmaps);
|
||||
while (NSNextMapEnumeratorPair(&enumerator, &key, &val))
|
||||
{
|
||||
if (val == (void*)self)
|
||||
{
|
||||
NSMapRemove(windowmaps, key);
|
||||
}
|
||||
}
|
||||
NSEndMapTableEnumeration(&enumerator);
|
||||
|
||||
DESTROY(server_info);
|
||||
DESTROY(event_queue);
|
||||
NSFreeMapTable(drag_types);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue