summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@serenityos.org>2020-06-12 16:27:34 +0300
committerAndreas Kling <kling@serenityos.org>2020-06-12 16:08:45 +0200
commit62d1ac63e8bc87d67c75e01ceeacac9773ed8bfb (patch)
tree5f1a7a68b1f5104352d41053a1113b68c2a87209
parenteb3700c56579e75a3f03892dd2e7344242c78837 (diff)
downloadserenity-62d1ac63e8bc87d67c75e01ceeacac9773ed8bfb.zip
MenuApplets: Fix using OwnPtr<> with RefCounted types
-rw-r--r--MenuApplets/Audio/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/MenuApplets/Audio/main.cpp b/MenuApplets/Audio/main.cpp
index c4b62ece18..c90a4adc6e 100644
--- a/MenuApplets/Audio/main.cpp
+++ b/MenuApplets/Audio/main.cpp
@@ -36,8 +36,8 @@ class AudioWidget final : public GUI::Widget {
C_OBJECT(AudioWidget)
public:
AudioWidget()
+ : m_audio_client(Audio::ClientConnection::construct())
{
- m_audio_client = make<Audio::ClientConnection>();
m_audio_client->on_muted_state_change = [this](bool muted) {
if (m_audio_muted == muted)
return;
@@ -68,7 +68,7 @@ private:
painter.blit({}, audio_bitmap, audio_bitmap.rect());
}
- OwnPtr<Audio::ClientConnection> m_audio_client;
+ NonnullRefPtr<Audio::ClientConnection> m_audio_client;
RefPtr<Gfx::Bitmap> m_muted_bitmap;
RefPtr<Gfx::Bitmap> m_unmuted_bitmap;
bool m_audio_muted { false };