devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=3341692acf3265c9cd32329ad28514adb8d1f3b9
commit 3341692acf3265c9cd32329ad28514adb8d1f3b9 Author: Chris Michael <[email protected]> Date: Thu Oct 23 10:32:59 2014 -0400 ecore-drm: Add error message for calling shutdown without calling init first. Summary: If someone calls ecore_drm_shutdown without first calling ecore_drm_init, then the init count is wrong. Warn the caller. @fix Signed-off-by: Chris Michael <[email protected]> --- src/lib/ecore_drm/ecore_drm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/ecore_drm/ecore_drm.c b/src/lib/ecore_drm/ecore_drm.c index 86f83d5..0a81bf2 100644 --- a/src/lib/ecore_drm/ecore_drm.c +++ b/src/lib/ecore_drm/ecore_drm.c @@ -103,7 +103,11 @@ EAPI int ecore_drm_shutdown(void) { /* _ecore_drm_init_count should not go below zero. */ - if (_ecore_drm_init_count < 1) return 0; + if (_ecore_drm_init_count < 1) + { + ERR("Ecore_Drm Shutdown called without Ecore_Drm Init"); + return 0; + } /* if we are still in use, decrement init count and get out */ if (--_ecore_drm_init_count != 0) return _ecore_drm_init_count; --
