diff options
author | Damiano Galassi <[email protected]> | 2017-06-19 19:53:00 +0200 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2017-06-19 19:53:00 +0200 |
commit | b523380c663ae9f5d5a9c17ce0b1d0ef21b06e22 (patch) | |
tree | 0973438dcf4577addde886e7f0f24b7607d0b3ec /macosx | |
parent | 9ea4f44fd42c8617d418a8a34d126995164f3c32 (diff) |
MacGui: do not crash if hb_video_encoder_get_name returns NULL, it might happens if there is a saved job with an external encoder (x264 10bit for example), and the external lib is no longer available.
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/HBJob+UIAdditions.m | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/macosx/HBJob+UIAdditions.m b/macosx/HBJob+UIAdditions.m index 569f1249d..a3a3322cf 100644 --- a/macosx/HBJob+UIAdditions.m +++ b/macosx/HBJob+UIAdditions.m @@ -361,7 +361,7 @@ static NSDictionary *shortHeightAttr; [attrString appendString:summary withAttributes:detailAttr]; [attrString appendString:@"\n" withAttributes:detailAttr]; } - + return attrString; } @@ -370,7 +370,8 @@ static NSDictionary *shortHeightAttr; NSMutableAttributedString *attrString = [[NSMutableAttributedString alloc] init]; NSMutableString *videoInfo = [NSMutableString string]; - [videoInfo appendFormat:@"Encoder: %@, ", @(hb_video_encoder_get_name(self.video.encoder))]; + const char *encoderName = hb_video_encoder_get_name(self.video.encoder); + [videoInfo appendFormat:@"Encoder: %@, ", encoderName ? @(encoderName) : @"Unknown"]; [videoInfo appendString:@"Framerate: "]; |