From 8afa40eaa7d55c158d71baccd693179eb9f06650 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Tue, 10 Mar 2026 16:43:20 +0100 Subject: [PATCH] rpcn: Fix segfault in rpcn_settings_dialog destructor This will happen if m_rpcn failed to connect in the constructor. --- rpcs3/rpcs3qt/rpcn_settings_dialog.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rpcs3/rpcs3qt/rpcn_settings_dialog.cpp b/rpcs3/rpcs3qt/rpcn_settings_dialog.cpp index 6de6007b31..cab71be3bc 100644 --- a/rpcs3/rpcs3qt/rpcn_settings_dialog.cpp +++ b/rpcs3/rpcs3qt/rpcn_settings_dialog.cpp @@ -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)