|
|
@@ -169,8 +169,12 @@ bool ClassFlowWebhook::doFlow(string zwtime)
|
|
|
bool numbersWithError = WebhookPublish(flowpostprocessing->GetNumbers());
|
|
|
|
|
|
#ifdef ALGROI_LOAD_FROM_MEM_AS_JPG
|
|
|
- if ((WebhookUploadImg == 1 || (WebhookUploadImg != 0 && numbersWithError)) && flowAlignment && flowAlignment->AlgROI) {
|
|
|
- WebhookUploadPic(flowAlignment->AlgROI);
|
|
|
+ if ((WebhookUploadImg == 1 || (WebhookUploadImg != 0 && numbersWithError)) && flowAlignment) {
|
|
|
+ ImageData *roiImage = flowAlignment->GetAlgROICopy();
|
|
|
+ if (roiImage != NULL) {
|
|
|
+ WebhookUploadPic(roiImage);
|
|
|
+ delete roiImage;
|
|
|
+ }
|
|
|
}
|
|
|
#endif
|
|
|
}
|