]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
change do not close if not opened
authorBastian Dehn <hhaalo@arcor.de>
Wed, 15 Jan 2025 20:26:04 +0000 (21:26 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Wed, 15 Jan 2025 20:26:04 +0000 (21:26 +0100)
src/kds_s2000w_net.c

index 647b3bd746338a1d947d106c371c28108ba2e51d..dfdd869bc8b942faf3f538c61841892db3096fb8 100644 (file)
@@ -76,6 +76,10 @@ void _sane_kds_s2000w_net_close(SANE_Handle handle)
 {
        debug_printf(ALL, "sane_kds_s2000w_net_close");
 
+       handler* h = (handler*) handle;
+       if (h->state != OPENED)
+               return;
+
        kds_s2000w_option_descriptor_free_option_descriptors();
        kds_s2000w_handler_close(handle);
 }