diff options
author | Chris Michael <cp.michael@samsung.com> | 2014-10-23 10:32:59 -0400 |
---|---|---|
committer | Chris Michael <cp.michael@samsung.com> | 2014-10-23 10:32:59 -0400 |
commit | 3341692acf3265c9cd32329ad28514adb8d1f3b9 (patch) | |
tree | 9f8c266a96eed64fdf80240346d70c4a34b28211 /src/lib/ecore_drm/ecore_drm.c | |
parent | 2409805f059860f285413e55fbcc7f27fb26ae41 (diff) |
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 <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/ecore_drm/ecore_drm.c')
-rw-r--r-- | src/lib/ecore_drm/ecore_drm.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/ecore_drm/ecore_drm.c b/src/lib/ecore_drm/ecore_drm.c index 86f83d59d9..0a81bf27f6 100644 --- a/src/lib/ecore_drm/ecore_drm.c +++ b/src/lib/ecore_drm/ecore_drm.c | |||
@@ -103,7 +103,11 @@ EAPI int | |||
103 | ecore_drm_shutdown(void) | 103 | ecore_drm_shutdown(void) |
104 | { | 104 | { |
105 | /* _ecore_drm_init_count should not go below zero. */ | 105 | /* _ecore_drm_init_count should not go below zero. */ |
106 | if (_ecore_drm_init_count < 1) return 0; | 106 | if (_ecore_drm_init_count < 1) |
107 | { | ||
108 | ERR("Ecore_Drm Shutdown called without Ecore_Drm Init"); | ||
109 | return 0; | ||
110 | } | ||
107 | 111 | ||
108 | /* if we are still in use, decrement init count and get out */ | 112 | /* if we are still in use, decrement init count and get out */ |
109 | if (--_ecore_drm_init_count != 0) return _ecore_drm_init_count; | 113 | if (--_ecore_drm_init_count != 0) return _ecore_drm_init_count; |