--- a/voicerecorder/RecViewSrc/CVRRecViewContainer.cpp Fri Mar 12 15:43:04 2010 +0200
+++ b/voicerecorder/RecViewSrc/CVRRecViewContainer.cpp Mon Mar 15 12:40:50 2010 +0200
@@ -478,6 +478,7 @@
}
if ( state != EDisabled )
+ if(iActiveVolumeControl != NULL)
{
iNaviPane->PushL( *iActiveVolumeControl );
CAknVolumeControl* control = static_cast< CAknVolumeControl* >(
@@ -551,7 +552,7 @@
TEventCode aType )
{
- if( !iActiveVolumeControl || !iVolumeChangeObserver->CanSetVolume() )
+ if( iActiveVolumeControl == NULL || iVolumeChangeObserver == NULL || !iVolumeChangeObserver->CanSetVolume() )
{
// Can't process volume change yet
return KErrNotReady;
@@ -659,9 +660,9 @@
{
case EEventStateChanged:
{
- if ( aControl == static_cast< CAknVolumeControl*>(iActiveVolumeControl->DecoratedControl()))
+ if ( iActiveVolumeControl && aControl == static_cast< CAknVolumeControl*>(iActiveVolumeControl->DecoratedControl()))
{
- if( !iActiveVolumeControl || !iVolumeChangeObserver->CanSetVolume() )
+ if(iVolumeChangeObserver == NULL || !iVolumeChangeObserver->CanSetVolume() )
{
// Can't process volume change yet
User::Leave(KErrNotReady);
@@ -694,6 +695,10 @@
User::Leave(KErrTooBig);
}
}
+ else if(iActiveVolumeControl == NULL)
+ {
+ User::Leave(KErrNotReady);
+ }
}
default:
break;