qv4l2: fix segmentation fault when compiled without ALSA support.
authorHans Verkuil <hans.verkuil@cisco.com>
Tue, 3 Jun 2014 09:04:16 +0000 (11:04 +0200)
committerHans Verkuil <hans.verkuil@cisco.com>
Tue, 3 Jun 2014 09:04:16 +0000 (11:04 +0200)
commit341f2f04a552b3b436a957e95d8af250c2cd1afb
tree81908ca0339f159b9b7935e5fdc4e2ff03881bb8
parentb83164ed8a216a1f3a09b8262e992ac3619a0bb3
qv4l2: fix segmentation fault when compiled without ALSA support.

If opening the video device fails, then qv4l2 attempts to disable
two alsa widgets. If qv4l2 was compiled without alsa support, then
those widget pointers are NULL and you get a segfault.

Add the proper #ifdef so this is only done if alsa support was
compiled in.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
utils/qv4l2/qv4l2.cpp