devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=7b1f4c09b94692d476126798278d539d3dfea125

commit 7b1f4c09b94692d476126798278d539d3dfea125
Author: Srivardhan Hebbar <[email protected]>
Date:   Thu Oct 23 09:04:29 2014 -0400

    ecore_drm: Making _ecore_drm_init_count not to go below zero in 
_ecore_drm_shutdown.
    
    Summary:
    If _ecore_drm_init_count goes below zero, then when next time 
ecore_drm_init is called, it won't do the initializations which it is supposed 
to do. So preventing this scenario by not making it go
    below zero in _ecore_wl_shutdown function.
    
    @fix
    
    Signed-off-by: Srivardhan Hebbar <[email protected]>
    
    Reviewers: devilhorns
    
    Reviewed By: devilhorns
    
    Subscribers: cedric
    
    Differential Revision: https://phab.enlightenment.org/D1573
---
 src/lib/ecore_drm/ecore_drm.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/lib/ecore_drm/ecore_drm.c b/src/lib/ecore_drm/ecore_drm.c
index 95a2103..86f83d5 100644
--- a/src/lib/ecore_drm/ecore_drm.c
+++ b/src/lib/ecore_drm/ecore_drm.c
@@ -102,6 +102,9 @@ log_err:
 EAPI int 
 ecore_drm_shutdown(void)
 {
+   /* _ecore_drm_init_count should not go below zero. */
+   if (_ecore_drm_init_count < 1) 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;
 

-- 


Reply via email to