Wysota says:
Qt Code:
  1. Why not stop the thread first and then close the camera?
To copy to clipboard, switch view to plain text mode 

If I stop thread first and the close cam i get a segmentation fault and program crash.
So i close cam first and then stop thread, this way i get error but program finish correctly.