summaryrefslogtreecommitdiff
path: root/src/lib/ecore_x
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-05-29 09:23:23 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-05-29 12:29:04 -0400
commitf1b29fbbe71c81ebda166c7e1f38819f22ecb3c5 (patch)
tree00b01a024286cfd1d53af8e087ac6eb9c65a88fb /src/lib/ecore_x
parent2cf3dc7a39c938b97e6fcf16d8ea06374eeb7536 (diff)
ecore-x: protect ecore_x_shutdown from creating a negative init count
Summary: @fix Depends on D8972 Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8973
Diffstat (limited to 'src/lib/ecore_x')
-rw-r--r--src/lib/ecore_x/ecore_x.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/ecore_x/ecore_x.c b/src/lib/ecore_x/ecore_x.c
index f3d8cae..500ef19 100644
--- a/src/lib/ecore_x/ecore_x.c
+++ b/src/lib/ecore_x/ecore_x.c
@@ -889,6 +889,11 @@ _ecore_x_shutdown2(void)
889EAPI int 889EAPI int
890ecore_x_shutdown(void) 890ecore_x_shutdown(void)
891{ 891{
892 if (!_ecore_x_init_count)
893 {
894 CRI("Calling ecore_x_shutdown without init! BUG!");
895 return 0;
896 }
892 if (--_ecore_x_init_count != 0) 897 if (--_ecore_x_init_count != 0)
893 return _ecore_x_init_count; 898 return _ecore_x_init_count;
894 if (_ecore_x_shutdown()) return _ecore_x_init_count; 899 if (_ecore_x_shutdown()) return _ecore_x_init_count;