Fix potential NPE

This commit is contained in:
Sebastián Katzer 2019-03-01 12:06:16 +01:00
parent 02d54a063f
commit 9362e4c341

View File

@ -47,7 +47,7 @@
*/ */
+ (BOOL) canPrintURL:(nullable NSString *)url + (BOOL) canPrintURL:(nullable NSString *)url
{ {
if (![NSURL URLWithString:url].scheme) if ([url isEqual:[NSNull null]] || ![NSURL URLWithString:url].scheme)
{ {
return UIPrintInteractionController.isPrintingAvailable; return UIPrintInteractionController.isPrintingAvailable;
} }