gui: fix crash on ecp5 gui, fix quadtree tests to not get broken by clangformat
This commit is contained in:
parent
5cc5fa04a4
commit
474aa3470a
@ -363,10 +363,16 @@ class Model : public QAbstractItemModel
|
|||||||
{
|
{
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case ElementType::BEL:
|
case ElementType::BEL:
|
||||||
|
if (bel_root_ == nullptr)
|
||||||
|
return boost::none;
|
||||||
return bel_root_->getById(id);
|
return bel_root_->getById(id);
|
||||||
case ElementType::WIRE:
|
case ElementType::WIRE:
|
||||||
|
if (wire_root_ == nullptr)
|
||||||
|
return boost::none;
|
||||||
return wire_root_->getById(id);
|
return wire_root_->getById(id);
|
||||||
case ElementType::PIP:
|
case ElementType::PIP:
|
||||||
|
if (pip_root_ == nullptr)
|
||||||
|
return boost::none;
|
||||||
return pip_root_->getById(id);
|
return pip_root_->getById(id);
|
||||||
case ElementType::CELL:
|
case ElementType::CELL:
|
||||||
return cell_root_->getById(id);
|
return cell_root_->getById(id);
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
#include "nextpnr.h"
|
#include "nextpnr.h"
|
||||||
|
|
||||||
#include "quadtree.h"
|
#include "quadtree.h"
|
||||||
|
|
||||||
USING_NEXTPNR_NAMESPACE
|
USING_NEXTPNR_NAMESPACE
|
||||||
|
Loading…
Reference in New Issue
Block a user