rpcn: Fix segfault in rpcn_settings_dialog destructor

This will happen if m_rpcn failed to connect in the constructor.
This commit is contained in:
Megamouse
2026-03-10 16:43:20 +01:00
parent c7a576edce
commit 8afa40eaa7
+3
View File
@@ -1346,9 +1346,12 @@ rpcn_friends_dialog::rpcn_friends_dialog(QWidget* parent)
} }
rpcn_friends_dialog::~rpcn_friends_dialog() rpcn_friends_dialog::~rpcn_friends_dialog()
{
if (m_rpcn)
{ {
m_rpcn->remove_friend_cb(friend_callback, this); m_rpcn->remove_friend_cb(friend_callback, this);
} }
}
bool rpcn_friends_dialog::add_friend_with_error_dialog(const std::string& friend_username) bool rpcn_friends_dialog::add_friend_with_error_dialog(const std::string& friend_username)
{ {