[libgnome-volume-control/do-not-deref-null-pointer] gvc-mixer-ui-device: Do not deref NULL pointer
- From: Kai Lüke <kailueke src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgnome-volume-control/do-not-deref-null-pointer] gvc-mixer-ui-device: Do not deref NULL pointer
- Date: Tue, 5 Jan 2021 22:35:24 +0000 (UTC)
commit 1949be72667dec4220de5cfbd4e3066d32a9a63a
Author: Kai Lüke <kailueke riseup net>
Date: Mon Jan 4 22:03:16 2021 +0100
gvc-mixer-ui-device: Do not deref NULL pointer
gvc-mixer-ui-device.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/gvc-mixer-ui-device.c b/gvc-mixer-ui-device.c
index f7dd33e..a2bdc45 100644
--- a/gvc-mixer-ui-device.c
+++ b/gvc-mixer-ui-device.c
@@ -557,6 +557,11 @@ gvc_mixer_ui_device_get_active_profile (GvcMixerUIDevice* device)
}
profile = gvc_mixer_card_get_profile (device->priv->card);
+ if (profile == NULL) {
+ g_debug ("Device has no assigned profile");
+ return NULL;
+ }
+
return gvc_mixer_ui_device_get_matching_profile (device, profile->profile);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]