Fixed crash for external installation
authorSoyoung Kim <sy037.kim@samsung.com>
Wed, 26 Dec 2012 04:38:55 +0000 (13:38 +0900)
committerSoyoung Kim <sy037.kim@samsung.com>
Wed, 26 Dec 2012 04:41:46 +0000 (13:41 +0900)
[Issue#] N/A
[Problem] occur crash about external installation
[Cause] N/A
[Solution] fixed deinitialize
[SCMRequest] N/A

src/jobs/widget_install/job_widget_install.cpp

index 5867245..1c2f7d0 100644 (file)
@@ -702,12 +702,15 @@ void JobWidgetInstall::SendFinishedSuccess()
     // TODO : sync should move to separate task.
     sync();
 
-    if (false == m_installerContext.existingWidgetInfo.isExist) {
-        WidgetInstallToExtSingleton::Instance().postInstallation(true);
-    } else {
-        WidgetInstallToExtSingleton::Instance().postUpgrade(true);
+
+    if (INSTALL_LOCATION_TYPE_EXTERNAL == m_installerContext.locationType) {
+        if (false == m_installerContext.existingWidgetInfo.isExist) {
+            WidgetInstallToExtSingleton::Instance().postInstallation(true);
+        } else {
+            WidgetInstallToExtSingleton::Instance().postUpgrade(true);
+        }
+        WidgetInstallToExtSingleton::Instance().deinitialize();
     }
-    WidgetInstallToExtSingleton::Instance().deinitialize();
 
     // remove widget install information file
     unlink(m_installerContext.installInfo.c_str());