summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Korbatits <kurt.korbatits@nokia.com>2010-02-08 09:50:33 +1000
committerKurt Korbatits <kurt.korbatits@nokia.com>2010-02-08 09:50:33 +1000
commit3108f02f35685bd57486e198277c600e09d98b13 (patch)
tree60e1bada5aa26ec524b1c813c32b91adcfb3aa66
parenta4ac042461bdb019433aa4e2d04a6be1c5f29591 (diff)
downloadqt4-tools-3108f02f35685bd57486e198277c600e09d98b13.tar.gz
[CRASH] audioinput and audiooutput examples crash when no devices are
available. Task-number:QTBUG-7783 Reviewed-by:Justin McPherson
-rw-r--r--examples/multimedia/audioinput/audioinput.cpp3
-rw-r--r--examples/multimedia/audiooutput/audiooutput.cpp3
2 files changed, 6 insertions, 0 deletions
diff --git a/examples/multimedia/audioinput/audioinput.cpp b/examples/multimedia/audioinput/audioinput.cpp
index 8cc9948214..fbf4dc47e3 100644
--- a/examples/multimedia/audioinput/audioinput.cpp
+++ b/examples/multimedia/audioinput/audioinput.cpp
@@ -213,6 +213,9 @@ InputTest::InputTest()
if(format.sampleSize() != 16) {
qWarning()<<"audio device doesn't support 16 bit samples, example cannot run";
+ audioInput = 0;
+ button->setDisabled(true);
+ button2->setDisabled(true);
return;
}
diff --git a/examples/multimedia/audiooutput/audiooutput.cpp b/examples/multimedia/audiooutput/audiooutput.cpp
index 0c57f4dd21..b44accdf14 100644
--- a/examples/multimedia/audiooutput/audiooutput.cpp
+++ b/examples/multimedia/audiooutput/audiooutput.cpp
@@ -179,6 +179,9 @@ AudioTest::AudioTest()
if(settings.sampleSize() != 16) {
qWarning()<<"audio device doesn't support 16 bit samples, example cannot run";
+ button->setDisabled(true);
+ button2->setDisabled(true);
+ audioOutput = 0;
return;
}