Check for non-nill before removing a key from a dictionary (avoids useless warnings)

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@6431 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Karl Kraft 2000-04-06 22:31:24 +00:00
parent 747cc2ce03
commit 4804f49132
3 changed files with 5 additions and 2 deletions

View file

@ -1,3 +1,6 @@
2000-04-06 Karl Kraft <karl@nfox.com>
* Added two checks for non-nil key before calling removeObjectForKey:
2000-03-31 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWResourceManager.m: Added Debug Error Traces

View file

@ -49,7 +49,7 @@ static char rcsId[] = "$Id$";
[_associations removeObjectForKey:href__Key];
[_associations removeObjectForKey:multipleSubmit__Key];
[_associations removeObjectForKey:actionClass__Key];
[_associations removeObjectForKey:directActionName];
if (directActionName) [_associations removeObjectForKey:directActionName];
#if !GSWEB_STRICT
[_associations removeObjectForKey:disabled__Key];
[_associations removeObjectForKey:enabled__Key];

View file

@ -40,7 +40,7 @@ static char rcsId[] = "$Id$";
forKey:@"type"];
[_associations removeObjectForKey:action__Key];
[_associations removeObjectForKey:actionClass__Key];
[_associations removeObjectForKey:directActionName];
if (directActionName) [_associations removeObjectForKey:directActionName];
if (![_associations objectForKey:value__Key])
[_associations setObject:[GSWAssociation associationWithValue:@"submit"]