bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #14022] Remove nil object (NSMapRemove) in SQLClient on Mac.


From: Yen-Ju Chen
Subject: [bug #14022] Remove nil object (NSMapRemove) in SQLClient on Mac.
Date: Wed, 3 Aug 2005 06:48:38 +0000
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/412.6 (KHTML, like Gecko) Safari/412.2

URL:
  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=14022>

                 Summary: Remove nil object (NSMapRemove) in SQLClient on
Mac.
                 Project: GNUstep
            Submitted by: yjchen
            Submitted on: Wed 08/03/2005 at 06:48
                Category: Libraries
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open

    _______________________________________________________

Details:

There is a bug I noticed while writing a SQLite bundle for SQLClient.
It crashes while trying to remove a nil object on Mac OSX.
Here is a patch.

*** SQLClient.m.orig    Tue Aug  2 23:43:08 2005
--- SQLClient.m Tue Aug  2 23:39:02 2005
***************
*** 967,973 ****
          [self disconnect];
        }
        RETAIN(self);
!       NSMapRemove(cache, (void*)_name);
        ASSIGNCOPY(_name, s);
        ASSIGN(_client, [[NSProcessInfo processInfo] globallyUniqueString]);
        NSMapInsert(cache, (void*)_name, (void*)self);
--- 967,974 ----
          [self disconnect];
        }
        RETAIN(self);
!       if (_name)
!           NSMapRemove(cache, (void*)_name);
        ASSIGNCOPY(_name, s);
        ASSIGN(_client, [[NSProcessInfo processInfo] globallyUniqueString]);
        NSMapInsert(cache, (void*)_name, (void*)self);







    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=14022>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]