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 093e9dc5c7

View file

@ -1347,7 +1347,10 @@ rpcn_friends_dialog::rpcn_friends_dialog(QWidget* parent)
rpcn_friends_dialog::~rpcn_friends_dialog()
{
m_rpcn->remove_friend_cb(friend_callback, this);
if (m_rpcn)
{
m_rpcn->remove_friend_cb(friend_callback, this);
}
}
bool rpcn_friends_dialog::add_friend_with_error_dialog(const std::string& friend_username)