Skip to content

Commit

Permalink
gui: Issue an error instead of crashing when loading a drc file witho…
Browse files Browse the repository at this point in the history
…ut a database opened.

Signed-off-by: Christian Costa <[email protected]>
  • Loading branch information
titan73 committed Aug 19, 2024
1 parent e2d31e1 commit 4e21578
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/gui/src/drcWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,14 @@ void DRCWidget::setLogger(utl::Logger* logger)

void DRCWidget::selectReport()
{
if (!block_) {
try {
logger_->error(utl::GUI, 104, "No database has been loaded");
} catch (const std::runtime_error& e) {
}
return;
}

// OpenLane uses .drc and OpenROAD-flow-scripts uses .rpt
QString filename = QFileDialog::getOpenFileName(
this,
Expand Down

0 comments on commit 4e21578

Please sign in to comment.