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:
Richard Frith-Macdonald 2003-10-29 07:01:13 +00:00
parent 6aef871f82
commit e1fd264d4f
2 changed files with 27 additions and 2 deletions

View file

@ -1,9 +1,15 @@
2003-10-29 Richard Frith-Macdonald <rfm@gnu.org>
* Source/GSDisplayServer.m: ([-dealloc]) remove deallocated server
from windowsmap to avoid segfault on app shuytdown ... fix suggested
by benhur@inf.ufsm.br
2003-10-29 02:22 Alexander Malmberg <alexander@malmberg.org>
* Source/GSServicesManager.m (-updateServicesMenu): Always enable
an item with a submenu.
2003-10-27 Richard Frith-Macdonald <rfm@gnu.org>
2003-10-28 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSSavePanel.m: Change to have entire window accept DnD.
* Source/NSWindow.m: Fix to get whole window DnD working, also
@ -11,7 +17,7 @@
first drag-aware view ... Adam reports that this seems to be the
behavior on MacOS-X too.
2003-10-27 Richard Frith-Macdonald <rfm@gnu.org>
2003-10-28 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSOpenPanel.m: Allow users to type in an absolute path name.
Support DnD of filename into panel.

View file

@ -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);