Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/bus/client/DB8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,13 +210,16 @@ bool DB8::onFind(LSHandle* sh, LSMessage* message, void* context)
}

launchPoint = LaunchPointList::getInstance().getByLaunchPointId(launchPointId);
if (launchPoint == nullptr) {
Logger::warning(getClassName(), __FUNCTION__, "Cannot find launch point");
DB8::getInstance().deleteLaunchPoint(launchPointId);
continue;
}
if (type == "default") {
launchPoint->setDatabase(results[i]);
} else if (type == "bookmark") {
if (launchPoint == nullptr) {
launchPoint = LaunchPointList::getInstance().createBootmarkByDB(appDesc, results[i]);
LaunchPointList::getInstance().add(launchPoint);
}
launchPoint = LaunchPointList::getInstance().createBootmarkByDB(appDesc, results[i]);
LaunchPointList::getInstance().add(launchPoint);
}
}
Logger::info(getInstance().getClassName(), __FUNCTION__, "Complete to sync DB8");
Expand Down
6 changes: 6 additions & 0 deletions src/manager/PolicyManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@ void PolicyManager::onCloseForRemove(LunaTaskPtr lunaTask)
{
lunaTask->setSuccessCallback(boost::bind(&PolicyManager::onReplyWithoutIds, this, boost::placeholders::_1));
LaunchPointPtr launchPoint = LaunchPointList::getInstance().getByLaunchPointId(lunaTask->getLaunchPointId());
if (launchPoint == nullptr) {
Logger::warning(getClassName(), __FUNCTION__, "Cannot find launch point");
lunaTask->setErrCodeAndText(ErrCode_GENERAL, "Cannot find launch point");
lunaTask->error(lunaTask);
return;
}

switch(launchPoint->getType()) {
case LaunchPointType::LaunchPoint_DEFAULT:
Expand Down