Skip to content

Commit

Permalink
Fix crash in DecoderNSImage
Browse files Browse the repository at this point in the history
  • Loading branch information
AlienCowEatCake committed Sep 24, 2018
1 parent cce5a1a commit 37a1298
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ImageViewer/src/Decoders/Impl/DecoderNSImage.mm
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ QStringList supportedFormats() const
{
for(NSString *uti in [NSImage imageTypes])
{
if(!uti)
continue;
CFArrayRef tags = UTTypeCopyAllTagsWithClass((__bridge CFStringRef)uti, kUTTagClassFilenameExtension);
if(!tags)
continue;
for(CFIndex i = 0, count = CFArrayGetCount(tags); i < count; ++i)
{
CFStringRef tag = (CFStringRef)CFArrayGetValueAtIndex(tags, i);
Expand Down

0 comments on commit 37a1298

Please sign in to comment.