diff --git a/pom.xml b/pom.xml
index fc3508a..66d8f5c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,7 +10,7 @@
org.delaunois
brotherql
- 1.1.0-SNAPSHOT
+ 1.1.1-SNAPSHOT
jar
diff --git a/src/main/java/org/delaunois/brotherql/backend/BrotherQLDeviceUsb.java b/src/main/java/org/delaunois/brotherql/backend/BrotherQLDeviceUsb.java
index b61ba2b..1f5da76 100644
--- a/src/main/java/org/delaunois/brotherql/backend/BrotherQLDeviceUsb.java
+++ b/src/main/java/org/delaunois/brotherql/backend/BrotherQLDeviceUsb.java
@@ -86,12 +86,14 @@ public BrotherQLDeviceUsb(URI uri) {
throw new LibUsbException(Rx.msg("libusb.initerror"), result);
LibUsb.setOption(context, LibUsb.OPTION_LOG_LEVEL, LibUsb.LOG_LEVEL_INFO);
- if (!"usb".equals(uri.getScheme())) {
- throw new IllegalArgumentException("Only usb supported");
- }
-
- if (!"Brother".equals(uri.getHost())) {
- throw new IllegalArgumentException("Only Brother printers supported");
+ if (uri != null) {
+ if (!"usb".equals(uri.getScheme())) {
+ throw new IllegalArgumentException("Only usb supported");
+ }
+
+ if (!"Brother".equals(uri.getHost())) {
+ throw new IllegalArgumentException("Only Brother printers supported");
+ }
}
}