mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
fix possible dereference of null pointer
This commit is contained in:
parent
f6d2806098
commit
61da0dab96
2 changed files with 13 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2024-03-11 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSNotificationCenter.m: Ensure class pointer is initialised
|
||||
before use (git issue #381).
|
||||
|
||||
2024-03-10 Hugo Melder <service@hugomelder.com>
|
||||
* Headers/Foundation/NSDate.h:
|
||||
* Source/NSDate.m:
|
||||
|
|
|
@ -679,6 +679,14 @@ static NSNotificationCenter *default_center = nil;
|
|||
{
|
||||
concrete = [GSNotification class];
|
||||
}
|
||||
/* Ensure value is initialised before we use it in
|
||||
* -removeObserver:name:object:
|
||||
*/
|
||||
if (nil == GSNotificationObserverClass)
|
||||
{
|
||||
[GSNotificationObserver class];
|
||||
}
|
||||
|
||||
/*
|
||||
* Do alloc and init separately so the default center can refer to
|
||||
* the 'default_center' variable during initialisation.
|
||||
|
|
Loading…
Reference in a new issue