widgets/widgetinstaller/src/WidgetUIOperationsWatcher.cpp
branchRCL_3
changeset 36 c711bdda59f4
parent 35 1f3c3f2f5b0a
child 37 ac77f89b1d9e
--- a/widgets/widgetinstaller/src/WidgetUIOperationsWatcher.cpp	Mon Mar 15 12:44:50 2010 +0200
+++ b/widgets/widgetinstaller/src/WidgetUIOperationsWatcher.cpp	Wed Mar 31 23:16:40 2010 +0300
@@ -479,9 +479,15 @@
         iWidgetInHS = iRegistry.IsWidgetInMiniView( aUid );
         // get original install dir from registry in case user
         // decides to "overrite" to another memory location
-        iOriginalDir = *( iRegistry.GetWidgetPropertyValueL(
+        CWidgetPropertyValue *propValue = iRegistry.GetWidgetPropertyValueL(
                               TUid::Uid( *(iPropertyValues[EUid]) ),
-                              EBasePath ) );
+                              EBasePath );
+                              
+        iOriginalDir.Zero();
+        if(propValue)
+            iOriginalDir = *propValue;
+            
+        delete propValue;
         }
     // uid for a new widget will be gotten once install location (c: or
     // e:) is selected
@@ -997,8 +1003,10 @@
         if ( !iSilent ) { iUIHandler->DisplayUninstallInProgressL(); }
         TBuf<KWidgetRegistryVal> widgetPath;
         iRegistry.GetWidgetPath( aUid, widgetPath );
-        TBool aVendor = *(iRegistry.GetWidgetPropertyValueL(aUid, ENokiaWidget));
-
+        
+        CWidgetPropertyValue* propValue = iRegistry.GetWidgetPropertyValueL(aUid, ENokiaWidget);
+        TBool aVendor = propValue && *(propValue);
+        delete propValue;
 
         // TODO if any of next steps leave does state become inconsistent?