]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
fix read current metadata only image not null
authorBastian Dehn <hhaalo@arcor.de>
Tue, 24 Dec 2024 12:54:17 +0000 (13:54 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Tue, 24 Dec 2024 12:54:17 +0000 (13:54 +0100)
src/kds_s2000w_handler.c

index 8b96f39081b6dcb8ad0a4dde70a1ebb6dff4916c..fee2739586508952de40ed0e266f423b328987e4 100644 (file)
@@ -110,7 +110,7 @@ void kds_s2000w_handler_get_current_metadata(handler* h, metadata* params)
        if (strcmp(color_value, "BW") == 0)
                params->format = 0;
 
-       if (h->image->size < 1)
+       if (h->image->data == NULL)
                return;
 
        image_metadata* mdata = malloc(sizeof(image_metadata));