forked from enlightenment/efl
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
This commit is contained in:
parent
2cf3dc7a39
commit
f1b29fbbe7
|
@ -889,6 +889,11 @@ _ecore_x_shutdown2(void)
|
|||
EAPI int
|
||||
ecore_x_shutdown(void)
|
||||
{
|
||||
if (!_ecore_x_init_count)
|
||||
{
|
||||
CRI("Calling ecore_x_shutdown without init! BUG!");
|
||||
return 0;
|
||||
}
|
||||
if (--_ecore_x_init_count != 0)
|
||||
return _ecore_x_init_count;
|
||||
if (_ecore_x_shutdown()) return _ecore_x_init_count;
|
||||
|
|
Loading…
Reference in New Issue