photosgallery/slideshow/view/src/shwslideshowview.cpp
changeset 2 7d9067c6fcb1
parent 0 4e91876724a2
child 9 6b87b143d312
--- a/photosgallery/slideshow/view/src/shwslideshowview.cpp	Thu Jan 07 12:46:23 2010 +0200
+++ b/photosgallery/slideshow/view/src/shwslideshowview.cpp	Mon Jan 18 20:19:20 2010 +0200
@@ -337,13 +337,12 @@
 	iShwGestureControl = CShwGestureControl::NewL(*iEnv,*iDisplay,*this);
 	iGestureControlGroup->AppendL( iShwGestureControl );
 	
-	iGestureControl = GestureHelper::CGestureControl::NewLC( 
+	GestureHelper::CGestureControl* gestureControl = GestureHelper::CGestureControl::NewLC( 
             *iShwGestureControl, *iEnv, *iDisplay, KGestureControlGroupId );
+    iGestureControl = gestureControl;
+    CleanupStack::Pop( gestureControl ); // doc says the following takes ownership, but reality is different!
 	iGestureControlGroup->AppendL( iGestureControl );
-	
-    // doc says the following takes ownership, but reality is different!
-    
-    CleanupStack::Pop( iGestureControl );
+
 	// Need a mechanism to distinguish when we receive the MusicVolume 
 	// callback for the first time
 	iCurrentVolume = -1;