Should have been part of previous commit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39290 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
5a13e7b045
commit
6bb1b32f42
@ -75,7 +75,7 @@ Function::RemoveListener(Listener* listener)
|
||||
void
|
||||
Function::AddInstance(FunctionInstance* instance)
|
||||
{
|
||||
bool firstInstance = fInstances.First() == NULL;
|
||||
bool firstInstance = fInstances.IsEmpty();
|
||||
fInstances.Add(instance);
|
||||
if (firstInstance && SourceFile() != NULL) {
|
||||
instance->SourceFile()->AcquireReference();
|
||||
@ -88,7 +88,7 @@ void
|
||||
Function::RemoveInstance(FunctionInstance* instance)
|
||||
{
|
||||
fInstances.Remove(instance);
|
||||
if (fInstances.First() == NULL && SourceFile() != NULL) {
|
||||
if (fInstances.IsEmpty() && instance->SourceFile() != NULL) {
|
||||
instance->SourceFile()->RemoveListener(this);
|
||||
instance->SourceFile()->ReleaseReference();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user