Fixed a potential crash when calling 'technology_changed_event' on an invalid CellViewRef.

This commit is contained in:
Matthias Koefferlein 2022-04-04 01:07:47 +02:00
parent 779c2392e7
commit afe7de9ca7
1 changed files with 3 additions and 0 deletions

View File

@ -1984,6 +1984,9 @@ static std::string get_technology (const lay::CellViewRef *cv)
static tl::Event &get_technology_changed_event (lay::CellViewRef *cv)
{
if (! cv->is_valid ()) {
throw tl::Exception (tl::to_string (QObject::tr ("Not a valid cellview")));
}
return (*cv)->technology_changed_event;
}