devilhorns pushed a commit to branch master.

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

commit d9b59f34d2bba43ba6b352789042199b9f746c47
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Wed May 13 14:39:57 2015 -0400

    ecore-drm: Fix issue with output_current_resolution_get function
    
    Summary: This fixes ecore_drm_output_current_resolution_get function
    to properly operate if an output does not have a current mode assigned.
    
    @fix
    
    Signed-off-by: Chris Michael <cp.mich...@samsung.com>
---
 src/lib/ecore_drm/ecore_drm_output.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/lib/ecore_drm/ecore_drm_output.c 
b/src/lib/ecore_drm/ecore_drm_output.c
index 8d922f8..b2dbdfd 100644
--- a/src/lib/ecore_drm/ecore_drm_output.c
+++ b/src/lib/ecore_drm/ecore_drm_output.c
@@ -1132,8 +1132,14 @@ ecore_drm_output_position_get(Ecore_Drm_Output *output, 
int *x, int *y)
 EAPI void
 ecore_drm_output_current_resolution_get(Ecore_Drm_Output *output, int *w, int 
*h, unsigned int *refresh)
 {
+   if (w) *w = 0;
+   if (h) *h = 0;
+   if (refresh) *refresh = 0;
+
    EINA_SAFETY_ON_NULL_RETURN(output);
 
+   if (!output->current_mode) return;
+
    if (w) *w = output->current_mode->width;
    if (h) *h = output->current_mode->height;
    if (refresh) *refresh = output->current_mode->refresh;

-- 


Reply via email to