gui: fix crash on ecp5 gui, fix quadtree tests to not get broken by clangformat

This commit is contained in:
Sergiusz Bazanski 2018-08-01 04:42:41 +01:00
parent 5cc5fa04a4
commit 474aa3470a
2 changed files with 7 additions and 0 deletions

View File

@ -363,10 +363,16 @@ class Model : public QAbstractItemModel
{
switch (type) {
case ElementType::BEL:
if (bel_root_ == nullptr)
return boost::none;
return bel_root_->getById(id);
case ElementType::WIRE:
if (wire_root_ == nullptr)
return boost::none;
return wire_root_->getById(id);
case ElementType::PIP:
if (pip_root_ == nullptr)
return boost::none;
return pip_root_->getById(id);
case ElementType::CELL:
return cell_root_->getById(id);

View File

@ -19,6 +19,7 @@
#include "gtest/gtest.h"
#include "nextpnr.h"
#include "quadtree.h"
USING_NEXTPNR_NAMESPACE