diff options
Diffstat (limited to 'src/lib/evil')
-rw-r--r-- | src/lib/evil/evil_main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/evil/evil_main.c b/src/lib/evil/evil_main.c index ee1eb1d113..2c30ebb513 100644 --- a/src/lib/evil/evil_main.c +++ b/src/lib/evil/evil_main.c @@ -65,6 +65,13 @@ evil_init(void) int evil_shutdown(void) { + /* _evil_init_count should not go below zero. */ + if (_evil_init_count < 1) + { + ERR("Evil shutdown called without calling evil init.\n"); + return 0; + } + if (--_evil_init_count != 0) return _evil_init_count; |