summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm/ecore_drm.c
diff options
context:
space:
mode:
authorSrivardhan Hebbar <sri.hebbar@samsung.com>2014-10-23 09:04:29 -0400
committerChris Michael <cp.michael@samsung.com>2014-10-23 09:04:55 -0400
commit7b1f4c09b94692d476126798278d539d3dfea125 (patch)
treef24a1a87e2409dec2cf72ae68a817bb333b3c605 /src/lib/ecore_drm/ecore_drm.c
parent005cdf359d185c620944c70716d629062a4f6371 (diff)
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 <sri.hebbar@samsung.com> Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1573
Diffstat (limited to 'src/lib/ecore_drm/ecore_drm.c')
-rw-r--r--src/lib/ecore_drm/ecore_drm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/ecore_drm/ecore_drm.c b/src/lib/ecore_drm/ecore_drm.c
index 95a210365d..86f83d59d9 100644
--- a/src/lib/ecore_drm/ecore_drm.c
+++ b/src/lib/ecore_drm/ecore_drm.c
@@ -102,6 +102,9 @@ log_err:
102EAPI int 102EAPI int
103ecore_drm_shutdown(void) 103ecore_drm_shutdown(void)
104{ 104{
105 /* _ecore_drm_init_count should not go below zero. */
106 if (_ecore_drm_init_count < 1) return 0;
107
105 /* if we are still in use, decrement init count and get out */ 108 /* if we are still in use, decrement init count and get out */
106 if (--_ecore_drm_init_count != 0) return _ecore_drm_init_count; 109 if (--_ecore_drm_init_count != 0) return _ecore_drm_init_count;
107 110