1
0
mirror of https://git.familie-radermacher.ch/linux/ptouch-print.git synced 2025-05-13 15:22:56 +00:00

Fix segfault when using --force-tape-width without printer

When force_tape_width is *not* used it is expected to open/close the usb
device.
This commit is contained in:
Jan Baier 2024-08-14 14:12:31 +02:00 committed by Dominic Radermacher
parent 9cae7f465b
commit bc7d32a6e6

View File

@ -648,7 +648,7 @@ int main(int argc, char *argv[])
if (im != NULL) { if (im != NULL) {
gdImageDestroy(im); gdImageDestroy(im);
} }
if (forced_tape_width > 0) { if (!forced_tape_width) {
ptouch_close(ptdev); ptouch_close(ptdev);
} }
libusb_exit(NULL); libusb_exit(NULL);