Fix crash here...

This commit is contained in:
rock88 2020-06-07 22:55:30 +03:00
parent 4d3097af1b
commit afbe5d9417

View file

@ -27,8 +27,10 @@ HostButton::HostButton(Widget* parent, const std::string &address): Button(paren
m_host_status_icon = FA_POWER_OFF; m_host_status_icon = FA_POWER_OFF;
} }
if (auto scr = screen()) { if (ref_count() > 1) {
scr->perform_layout(); if (auto scr = screen()) {
scr->perform_layout();
}
} }
dec_ref(); dec_ref();