mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:47:44 +00:00
IRCClient: Use NonnullRefPtr<IRCClient> throughout
To protect against mishaps during app exit teardown, make sure everyone who needs to be is a co-owner of the IRCClient object. Fixes #3451.
This commit is contained in:
parent
039e529dbe
commit
4e0df06f86
6 changed files with 35 additions and 35 deletions
|
@ -33,7 +33,7 @@ IRCQuery::IRCQuery(IRCClient& client, const String& name)
|
|||
, m_name(name)
|
||||
, m_log(IRCLogBuffer::create())
|
||||
{
|
||||
m_window = m_client.aid_create_window(this, IRCWindow::Query, m_name);
|
||||
m_window = m_client->aid_create_window(this, IRCWindow::Query, m_name);
|
||||
m_window->set_log_buffer(*m_log);
|
||||
}
|
||||
|
||||
|
@ -66,6 +66,6 @@ void IRCQuery::add_message(const String& text, Color color)
|
|||
|
||||
void IRCQuery::say(const String& text)
|
||||
{
|
||||
m_client.send_privmsg(m_name, text);
|
||||
add_message(' ', m_client.nickname(), text);
|
||||
m_client->send_privmsg(m_name, text);
|
||||
add_message(' ', m_client->nickname(), text);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue