Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Network
KDE Connect
Commits
2006424e
Commit
2006424e
authored
Sep 17, 2022
by
ValdikSS ValdikSS
Browse files
Prevent null pointer dereference if there's no audio devices
BUG: 454917
parent
dcf41545
Pipeline
#233994
passed with stage
in 5 minutes and 28 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
plugins/systemvolume/systemvolumeplugin-win.cpp
View file @
2006424e
...
...
@@ -252,9 +252,19 @@ bool SystemvolumePlugin::sendSinkList()
unsigned
int
deviceCount
;
devices
->
GetCount
(
&
deviceCount
);
if
(
!
deviceCount
)
{
qWarning
(
"No audio devices detected"
);
return
false
;
}
IMMDevice
*
defaultDevice
=
nullptr
;
deviceEnumerator
->
GetDefaultAudioEndpoint
(
eRender
,
eMultimedia
,
&
defaultDevice
);
if
(
!
defaultDevice
)
{
qWarning
(
"No default audio device detected"
);
return
false
;
}
LPWSTR
defaultId
=
NULL
;
defaultDevice
->
GetId
(
&
defaultId
);
...
...
Aleix Pol Gonzalez
🐧
@apol
mentioned in commit
c6c6b1f4
·
Sep 18, 2022
mentioned in commit
c6c6b1f4
mentioned in commit c6c6b1f44323ddd7c22e9d366f37ce84bc907621
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment