Commit cf0875cc authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

MacOSX/Framework/VLCTime.m: Fix a segfault because of a missing retain. Create...

MacOSX/Framework/VLCTime.m: Fix a segfault because of a missing retain. Create a real null time. Code simplification.
parent b095d5f2
......@@ -30,7 +30,7 @@ static VLCTime *nullTime = nil;
+ (VLCTime *)nullTime
{
if (!nullTime)
nullTime = [VLCTime timeWithNumber:[NSNumber numberWithInt:0]];
nullTime = [[VLCTime timeWithNumber:nil] retain];
return nullTime;
}
......@@ -76,10 +76,7 @@ static VLCTime *nullTime = nil;
- (NSNumber *)numberValue
{
if (value)
return [value copy];
else
return nil;
return value ? [value copy] : nil;
}
- (NSString *)stringValue
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment