diff options
Diffstat (limited to 'Libraries/LibGUI/Notification.cpp')
-rw-r--r-- | Libraries/LibGUI/Notification.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/Libraries/LibGUI/Notification.cpp b/Libraries/LibGUI/Notification.cpp index a06598edd8..f07f056a72 100644 --- a/Libraries/LibGUI/Notification.cpp +++ b/Libraries/LibGUI/Notification.cpp @@ -32,17 +32,10 @@ Notification::~Notification() { } -static NotificationServerConnection& notification_server_connection() -{ - static NotificationServerConnection* connection; - if (!connection) - connection = &NotificationServerConnection::construct().leak_ref(); - return *connection; -} - void Notification::show() { - notification_server_connection().post_message(Messages::NotificationServer::ShowNotification(m_text, m_title)); + auto connection = NotificationServerConnection::construct(); + connection->post_message(Messages::NotificationServer::ShowNotification(m_text, m_title)); } } |