wallet2: fix out of sync account tag cache

This would cause crashes when trying to tag an account that was
just created
This commit is contained in:
moneromooo-monero 2018-06-15 20:17:25 +01:00
parent 62f3f0480a
commit bc443494f3
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3

View file

@ -944,6 +944,7 @@ void wallet2::expand_subaddresses(const cryptonote::subaddress_index& index)
} }
m_subaddress_labels.resize(index.major + 1, {"Untitled account"}); m_subaddress_labels.resize(index.major + 1, {"Untitled account"});
m_subaddress_labels[index.major].resize(index.minor + 1); m_subaddress_labels[index.major].resize(index.minor + 1);
get_account_tags();
} }
else if (m_subaddress_labels[index.major].size() <= index.minor) else if (m_subaddress_labels[index.major].size() <= index.minor)
{ {