device_trezor: add redundant check

This commit is contained in:
anon 2021-01-20 21:02:36 +00:00 committed by selsta
parent c6e1d7bcdf
commit d8137dc523

View file

@ -165,7 +165,7 @@ namespace trezor {
// Scoped session closer // Scoped session closer
BOOST_SCOPE_EXIT_ALL(&, this) { BOOST_SCOPE_EXIT_ALL(&, this) {
if (open_session){ if (open_session && this->get_transport()){
this->get_transport()->close(); this->get_transport()->close();
} }
}; };