videoplayback/videohelix/src/mpxvideoplayerutility.cpp
branchRCL_3
changeset 11 5294c000a26d
parent 10 ce5ada96ab30
child 13 112a725ff2c2
--- a/videoplayback/videohelix/src/mpxvideoplayerutility.cpp	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/videohelix/src/mpxvideoplayerutility.cpp	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 16 %
+// Version : %version: 18 %
 
 
 #include <AudioPreference.h>
@@ -288,7 +288,7 @@
 void CMpxVideoPlayerUtility::SurfaceRemovedFromView()
 {
     MPX_ENTER_EXIT(_L("CMpxVideoPlayerUtility::SurfaceRemovedFromView()"));
-    
+
     if ( ! iSurfaceId.IsNull() )
     {
         iSurfaceId = TSurfaceId::CreateNullId();
@@ -590,19 +590,17 @@
 {
     TInt error = KErrNone;
 
-    if ( iSurfaceId.IsNull() )
+    if ( !iSurfaceId.IsNull() )
     {
-        error = KErrNotFound;
-    }
+        //
+        //  Send command to view to remove the surface
+        //
+        MPX_TRAPD( err, SendSurfaceCommandL( EPbMsgVideoSurfaceRemoved ) );
 
-    //
-    //  Send command to view to remove the surface
-    //
-    MPX_TRAPD( err, SendSurfaceCommandL( EPbMsgVideoSurfaceRemoved ) );
+        error = iVideoPlaySurfaceSupportCustomCommands.SurfaceRemoved( iSurfaceId );
 
-    error = iVideoPlaySurfaceSupportCustomCommands.SurfaceRemoved( iSurfaceId );
-
-    iSurfaceId = TSurfaceId::CreateNullId();
+        iSurfaceId = TSurfaceId::CreateNullId();
+    }
 
     return error;
 }