fix WSACleanup condition

fixes https://github.com/gphoto/libgphoto2/issues/885
This commit is contained in:
Marcus Meissner
2023-01-18 11:08:59 +01:00
parent 3249cf6e65
commit 58cd99c447

View File

@@ -3237,7 +3237,7 @@ exitfailed:
(camera->port, GP_PORT_USB_ENDPOINT_INT);
}
#if defined(HAVE_LIBWS232) && defined(WIN32)
else if ((camera->port!=NULL) && camera->port->type != GP_PORT_PTPIP) {
else if ((camera->port!=NULL) && (camera->port->type == GP_PORT_PTPIP)) {
WSACleanup();
}
#endif