message: Don't automatically open a single capture if a dialog is open
  * Prevents a crash if the LiveCapture window is closed while it owns a popup
  dialog for e.g. saving or deleting a capture.
diff: @@ -770,8 +770,13 @@ void LiveCapture::openCapture(Capture *cap)
  bool LiveCapture::saveCapture(Capture *cap, QString path)
  {
  if(path.isEmpty())
  + {
  path = m_Main->GetSavePath();
  + if(path.isEmpty())
  + return false;
  + }
  +
  if(QString(m_Ctx.GetCaptureFilename()) == path)
  {
  RDDialog::critical(this, tr("Cannot save"), tr("Can't overwrite currently open capture at %1\n"
  @@ -783,8 +788,6 @@ bool LiveCapture::saveCapture(Capture *cap, QString path)
  // we copy the temp capture to the desired path, but the capture item remains referring to the
  // temp path.
  // This ensures that if the user deletes the saved path we can still open or re-save it.
  - if(!path.isEmpty())
  - {
  if(cap->local)
  {
  QFile src(cap->path);
  @@ -852,9 +855,6 @@ bool LiveCapture::saveCapture(Capture *cap, QString path)
  return true;
  }
  - return false;
  -}
  -
  void LiveCapture::cleanItems()
  {
  for(int i = 0; i < ui->captures->count(); i++)
  @@ -1058,6 +1058,10 @@ void LiveCapture::connectionClosed()
  return;
  }
  + // don't close if a dialog is open
  + if(QApplication::activeModalWidget() || QApplication::activePopupWidget())
  + return;
  +
  if(cap->opened)
  return;
  