From 9362e4c341a35731e402a834acf2d0526246cd49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Katzer?= Date: Fri, 1 Mar 2019 12:06:16 +0100 Subject: [PATCH] Fix potential NPE --- src/ios/APPPrinterItem.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ios/APPPrinterItem.m b/src/ios/APPPrinterItem.m index 671e24f..6342311 100644 --- a/src/ios/APPPrinterItem.m +++ b/src/ios/APPPrinterItem.m @@ -47,7 +47,7 @@ */ + (BOOL) canPrintURL:(nullable NSString *)url { - if (![NSURL URLWithString:url].scheme) + if ([url isEqual:[NSNull null]] || ![NSURL URLWithString:url].scheme) { return UIPrintInteractionController.isPrintingAvailable; }