From c5e16ed805ffa88e03611e5fe1125c0d3ca72191 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Thu, 19 Dec 2019 15:53:56 +1100 Subject: [PATCH] only show export dialog if the sequence is not empty --- app/core.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/core.cpp b/app/core.cpp index e55d4b87b..82ef9a5a6 100644 --- a/app/core.cpp +++ b/app/core.cpp @@ -232,8 +232,15 @@ void Core::DialogExportShow() ViewerPanel* latest_viewer = olive::panel_manager->MostRecentlyFocused(); if (latest_viewer && latest_viewer->GetConnectedViewer()) { - ExportDialog ed(latest_viewer->GetConnectedViewer(), main_window_); - ed.exec(); + if (latest_viewer->GetConnectedViewer()->Length() == 0) { + QMessageBox::critical(main_window_, + tr("Error"), + tr("This Sequence is empty. There is nothing to export."), + QMessageBox::Ok); + } else { + ExportDialog ed(latest_viewer->GetConnectedViewer(), main_window_); + ed.exec(); + } } }