From 3cdec068f3219a9e1781a96910f2aa6b704d4702 Mon Sep 17 00:00:00 2001
From: Ryan Hanson <ryan@RyanMac.local>
Date: Sat, 14 Jan 2017 08:42:20 -1000
Subject: [PATCH] Fixing compile error in xcode 8

---
 Archiving/Image Importers/PXGifImporter.m | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Archiving/Image Importers/PXGifImporter.m b/Archiving/Image Importers/PXGifImporter.m
index 3c8d60c6..3d6b2387 100755
--- Archiving/Image Importers/PXGifImporter.m	
+++ Archiving/Image Importers/PXGifImporter.m	
@@ -11,9 +11,10 @@ @implementation PXGifImporter
 
 + (BOOL)fileAtURLIsAnimated:(NSURL *)url
 {
-	NSImage *tempImage = [[NSImage alloc] initWithContentsOfURL:url];
-	int frameCount = [[[[tempImage representations] objectAtIndex:0] valueForProperty:NSImageFrameCount] intValue];
-	return (frameCount > 1);
+    NSImage *tempImage = [[NSImage alloc] initWithContentsOfURL:url];
+    NSBitmapImageRep* gifRep = tempImage.representations.count ? tempImage.representations[0] : nil;
+    int frameCount = [[gifRep valueForProperty: NSImageFrameCount] intValue];
+    return (frameCount > 1);
 }
 
 @end
