From 713e7895fc1c29af744c526d4ddaaacac1bf53d3 Mon Sep 17 00:00:00 2001 From: Jiwoong Im Date: Wed, 24 Jun 2015 11:41:48 +0900 Subject: [PATCH] Fix bug in checking return value of create_cb call terminate_cb when the create_cb returns false Change-Id: Ib2f455efd01a8dff7debd2cab00c2515a1adbb43 Signed-off-by: Jiwoong Im --- src/appcore-efl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/appcore-efl.c b/src/appcore-efl.c index e42606c..f704dcb 100644 --- a/src/appcore-efl.c +++ b/src/appcore-efl.c @@ -802,9 +802,11 @@ static int __before_loop(struct ui_priv *ui, int *argc, char ***argv) 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; } -- 2.7.4