summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKurt Korbatits <kurt.korbatits@nokia.com>2010-02-07 23:50:33 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2010-02-08 18:45:13 (GMT)
commit76979f4963bdef9bbb3fd7c6441e78761d6f7438 (patch)
tree61e25f52cd54789ff0a8e0699b52fe93f6b41bd5
parent0cbbdff2515faaa37f2fd79dd55f564354251088 (diff)
downloadQt-76979f4963bdef9bbb3fd7c6441e78761d6f7438.zip
Qt-76979f4963bdef9bbb3fd7c6441e78761d6f7438.tar.gz
Qt-76979f4963bdef9bbb3fd7c6441e78761d6f7438.tar.bz2
[CRASH] audioinput and audiooutput examples crash when no devices are
available. Task-number:QTBUG-7783 Reviewed-by:Justin McPherson (cherry picked from commit 3108f02f35685bd57486e198277c600e09d98b13)
-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 a26fe16..b2e5c52 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 10d13db..008f7a9 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;
}