summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin McPherson <justin.mcpherson@nokia.com>2009-11-11 03:42:50 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2009-11-13 12:09:10 (GMT)
commitea5084564ba0463d96c013818cbf6098c5e6d075 (patch)
treeb91af2bf4df494134bdc3432f0dfd655a2fb6835
parent2d95b450d0cde992fd2ea9da1bc670c9984e9234 (diff)
downloadQt-ea5084564ba0463d96c013818cbf6098c5e6d075.zip
Qt-ea5084564ba0463d96c013818cbf6098c5e6d075.tar.gz
Qt-ea5084564ba0463d96c013818cbf6098c5e6d075.tar.bz2
Import change 924855 from phonon-svn.
r924855 | mkretz | 2009-02-12 05:49:12 +1000 (Thu, 12 Feb 2009) | 1 line forwardport: two more adaptor accesses where adaptor might be 0 Reviewed-by: Justin McPherson (cherry picked from commit 39a5111d292f69ece4deb6c4cd9f294a94c5cf19)
-rw-r--r--src/3rdparty/phonon/phonon/audiooutput.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/3rdparty/phonon/phonon/audiooutput.cpp b/src/3rdparty/phonon/phonon/audiooutput.cpp
index e54ec1f..3d03dc4 100644
--- a/src/3rdparty/phonon/phonon/audiooutput.cpp
+++ b/src/3rdparty/phonon/phonon/audiooutput.cpp
@@ -126,7 +126,9 @@ void AudioOutput::setName(const QString &newName)
d->name = newName;
setVolume(Platform::loadVolume(newName));
#ifndef QT_NO_DBUS
- emit d->adaptor->nameChanged(newName);
+ if (d->adaptor) {
+ emit d->adaptor->nameChanged(newName);
+ }
#endif
}
@@ -403,7 +405,9 @@ void AudioOutputPrivate::handleAutomaticDeviceChange(const AudioOutputDevice &de
AudioOutputPrivate::~AudioOutputPrivate()
{
#ifndef QT_NO_DBUS
- emit adaptor->outputDestroyed();
+ if (adaptor) {
+ emit adaptor->outputDestroyed();
+ }
#endif
}