mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 17:12:03 +00:00
Fix crasher if stream is opened more than once.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38841 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c3716c5ef1
commit
054927cf21
2 changed files with 10 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2015-07-27 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/GSStream.m: Fix failure to unschedule from run loop if a
|
||||||
|
stream is opened more than once.
|
||||||
|
|
||||||
2015-07-24 Richard Frith-Macdonald <rfm@gnu.org>
|
2015-07-24 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Headers/GNUstepBase/GSIMap.h: add GSI_MAP_TABLE_S
|
* Headers/GNUstepBase/GSIMap.h: add GSI_MAP_TABLE_S
|
||||||
|
|
|
@ -125,10 +125,14 @@ static RunLoopEventType typeForStream(NSStream *aStream)
|
||||||
|
|
||||||
- (void) removeStream: (NSStream*)aStream mode: (NSString*)mode
|
- (void) removeStream: (NSStream*)aStream mode: (NSString*)mode
|
||||||
{
|
{
|
||||||
|
/* We may have added the stream more than once (eg if the stream -open
|
||||||
|
* method was called more than once, so we need to remove all event
|
||||||
|
* registrations.
|
||||||
|
*/
|
||||||
[self removeEvent: [aStream _loopID]
|
[self removeEvent: [aStream _loopID]
|
||||||
type: typeForStream(aStream)
|
type: typeForStream(aStream)
|
||||||
forMode: mode
|
forMode: mode
|
||||||
all: NO];
|
all: YES];
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue