diff --git a/Cigarette/CaptureThreadBasler.cpp b/Cigarette/CaptureThreadBasler.cpp index 4b2ffb3..01674ca 100644 --- a/Cigarette/CaptureThreadBasler.cpp +++ b/Cigarette/CaptureThreadBasler.cpp @@ -24,10 +24,10 @@ void CaptureThreadBasler::process(void) bool last_result = false; try { - CSampleConfigurationEventHandler CfgEvent; - CfgEvent.channel_ = Local_Num; - //pDev_->RegisterConfiguration(&CfgEvent, Pylon::RegistrationMode_Append, Pylon::Cleanup_None); - pDev_->RegisterConfiguration(&CfgEvent, Pylon::RegistrationMode_Append, Pylon::Cleanup_Delete); + CSampleConfigurationEventHandler *CfgEvent=NULL; + CfgEvent = new CSampleConfigurationEventHandler; + CfgEvent->channel_ = Local_Num; + pDev_->RegisterConfiguration(CfgEvent, Pylon::RegistrationMode_Append, Pylon::Cleanup_None); CSampleImageEventHandler ImageEvent; ImageEvent.p_image_queue_ = p_image_queue; @@ -143,7 +143,7 @@ void CaptureThreadBasler::process(void) pDev_->StopGrabbing(); pDev_->Close(); pDev_->GrabCameraEvents = false; - pDev_->DeregisterConfiguration(&CfgEvent); + pDev_->DeregisterConfiguration(CfgEvent); pDev_->DeregisterImageEventHandler(&ImageEvent); #ifndef USB_BASLER_NEW_FW pDev_->DeregisterCameraEventHandler(&BurstEvent, "EventFrameBurstStartData");