call terminate_cb when the create_cb returns false
Change-Id: Ib2f455efd01a8dff7debd2cab00c2515a1adbb43
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
LOG(LOG_DEBUG, "LAUNCH", "[%s:Platform:appcore_init:done]", ui->name);
if (ui->ops && ui->ops->create) {
r = ui->ops->create(ui->ops->data);
- if (r == -1) {
+ if (r < 0) {
_ERR("create() return error");
appcore_exit();
+ if (ui->ops && ui->ops->terminate)
+ ui->ops->terminate(ui->ops->data);
errno = ECANCELED;
return -1;
}