Hi,
I've a slot:
Qt Code:
  1. void G2_ImageViewer::readImage()
  2. {
  3. this->mutex.lock();
  4. if(this->getRingBuffer()->isReadLocked())
  5. {
  6. this->readLocked.wait(&this->mutex);
  7. }
  8. this->mutex.unlock();
  9.  
  10. this->getRingBuffer()->pop();
  11. }
To copy to clipboard, switch view to plain text mode 

When the ringbuffer is read locked (this->getRingBuffer()->isReadLocked() == true), it waits that someone unlock it. The problem is that this slot is connected to the signal clicked() of a QPushButton and if the slot is locked and it receives another signal, the program crashes.

How can I do to avoid the problem?

Thank you! Dario

(sorry for my english)