From 56e9563deb36787e0fccb165e49aefd42e792b8f Mon Sep 17 00:00:00 2001 From: Lutz Mueller Date: Sat, 1 Dec 2001 23:42:02 +0000 Subject: [PATCH] Added one error report. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@3327 67ed7778-7388-44ab-90cf-0a291f65f57c --- libgphoto2_port/usb/libusb.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libgphoto2_port/usb/libusb.c b/libgphoto2_port/usb/libusb.c index 004aa0cae..2472b9d50 100644 --- a/libgphoto2_port/usb/libusb.c +++ b/libgphoto2_port/usb/libusb.c @@ -327,8 +327,11 @@ gp_port_usb_find_device_lib(GPPort *port, int idvendor, int idproduct) * Should the USB layer report that ? I don't know. * Better to check here. */ - if (!idvendor || !idproduct) + if (!idvendor || !idproduct) { + gp_port_set_error (port, _("The supplied vendor or product " + "id (%i,%i) is not valid.")); return GP_ERROR_BAD_PARAMETERS; + } for (bus = usb_busses; bus; bus = bus->next) { for (dev = bus->devices; dev; dev = dev->next) {