mirror of
https://github.com/darlinghq/darling-libobjc2.git
synced 2024-11-23 12:19:44 +00:00
Don't crash when trying to synchronize on nil (but don't do anything sensible either).
This commit is contained in:
parent
8979f19f1d
commit
d838f7ad28
@ -361,7 +361,7 @@ PRIVATE void gc_setTypeForClass(Class cls, void *type)
|
||||
|
||||
int objc_sync_enter(id object)
|
||||
{
|
||||
if (isSmallObject(object)) { return 0; }
|
||||
if ((object == 0) || isSmallObject(object)) { return 0; }
|
||||
struct reference_list *list = referenceListForObject(object, YES);
|
||||
LOCK(&list->lock);
|
||||
return 0;
|
||||
@ -369,7 +369,7 @@ int objc_sync_enter(id object)
|
||||
|
||||
int objc_sync_exit(id object)
|
||||
{
|
||||
if (isSmallObject(object)) { return 0; }
|
||||
if ((object == 0) || isSmallObject(object)) { return 0; }
|
||||
struct reference_list *list = referenceListForObject(object, NO);
|
||||
if (NULL != list)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user