summaryrefslogtreecommitdiffstats
path: root/audio/control.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2008-01-30 11:57:54 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2008-01-30 11:57:54 +0000
commit4eb241042f5f4f93c1b772398f1e3353394b6d8b (patch)
tree1895311647ac4fabc26582c268516dcf675b3328 /audio/control.c
parent9fa2613525721908ec43189794fe99828b8a4f51 (diff)
Add extra check for session->dev == NULL before accessing it
Diffstat (limited to 'audio/control.c')
-rw-r--r--audio/control.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/audio/control.c b/audio/control.c
index 3c14c230..9b062fbd 100644
--- a/audio/control.c
+++ b/audio/control.c
@@ -393,7 +393,8 @@ static void avctp_unref(struct avctp *session)
if (session->io)
g_source_remove(session->io);
- session->dev->control->session = NULL;
+ if (session->dev)
+ session->dev->control->session = NULL;
if (session->uinput >= 0) {
ioctl(session->uinput, UI_DEV_DESTROY);