PreviewURL is nil on old macOS for some reason
This commit is contained in:
@@ -76,10 +76,13 @@
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Convert to JPEG.
|
||||||
responseData = MBIMCGImageJPEGRepresentation(previewImage);
|
responseData = MBIMCGImageJPEGRepresentation(previewImage);
|
||||||
|
|
||||||
// Persist JPEG preview to disk
|
// Persist JPEG preview to disk
|
||||||
|
if (previewURL) {
|
||||||
[responseData writeToURL:previewURL atomically:YES];
|
[responseData writeToURL:previewURL atomically:YES];
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// File exists
|
// File exists
|
||||||
MBIMLogInfo(@"Using cached preview image for guid: %@ at %@", guid, [previewURL path]);
|
MBIMLogInfo(@"Using cached preview image for guid: %@ at %@", guid, [previewURL path]);
|
||||||
|
|||||||
Reference in New Issue
Block a user