From 56f3bcad1a0abd199a458a62c8bde0ebdff035d5 Mon Sep 17 00:00:00 2001 From: zecke Date: Tue, 21 Sep 2004 16:01:21 +0000 Subject: Only disconnect from sender if sender() is valid --- diff --git a/libopie2/opiecore/device/odevice.cpp b/libopie2/opiecore/device/odevice.cpp index ec861ee..b5ae4e5 100644 --- a/libopie2/opiecore/device/odevice.cpp +++ b/libopie2/opiecore/device/odevice.cpp @@ -780,7 +780,9 @@ void ODevice::remPreHandler(QWSServer::KeyboardFilter*aFilter) * @see changeMixerForAlarm */ void ODevice::playingStopped() { - const_cast(sender())->disconnect( this ); + if ( sender() ) + const_cast(sender())->disconnect( this ); + #ifndef QT_NO_SOUND if ( d->m_sound >= 0 ) { ::ioctl ( d->m_sound, MIXER_WRITE( d->m_mixer ), &d->m_vol ); -- cgit v0.9.0.2