summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-06-03 14:29:14 -0400
committerChris Michael <cp.michael@samsung.com>2015-06-05 10:00:44 -0400
commit354fd6f67b9d4069bfcf26c1899183f644e429a5 (patch)
treebaed3a820f19175cbb0fae30421fe7b164ef9149 /src/lib/ecore_drm
parentfb9f33035eb8cfdb17a57f2ac22613796cf7ebe7 (diff)
ecore-drm: Don't crash when trying to disable an output
Summary: If we call these functions with an already disabled output, we crash. Check for an output being 'enabled' before we make these calls. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/ecore_drm')
-rw-r--r--src/lib/ecore_drm/ecore_drm_output.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_output.c b/src/lib/ecore_drm/ecore_drm_output.c
index d6573f3a3d..e0ba526850 100644
--- a/src/lib/ecore_drm/ecore_drm_output.c
+++ b/src/lib/ecore_drm/ecore_drm_output.c
@@ -763,6 +763,7 @@ _ecore_drm_output_render_disable(Ecore_Drm_Output *output)
763 EINA_SAFETY_ON_NULL_RETURN(output); 763 EINA_SAFETY_ON_NULL_RETURN(output);
764 764
765 output->need_repaint = EINA_FALSE; 765 output->need_repaint = EINA_FALSE;
766 if (!output->enabled) return;
766 ecore_drm_output_cursor_size_set(output, 0, 0, 0); 767 ecore_drm_output_cursor_size_set(output, 0, 0, 0);
767 ecore_drm_output_dpms_set(output, DRM_MODE_DPMS_OFF); 768 ecore_drm_output_dpms_set(output, DRM_MODE_DPMS_OFF);
768} 769}
@@ -951,6 +952,7 @@ EAPI void
951ecore_drm_output_cursor_size_set(Ecore_Drm_Output *output, int handle, int w, int h) 952ecore_drm_output_cursor_size_set(Ecore_Drm_Output *output, int handle, int w, int h)
952{ 953{
953 EINA_SAFETY_ON_NULL_RETURN(output); 954 EINA_SAFETY_ON_NULL_RETURN(output);
955 if (!output->enabled) return;
954 drmModeSetCursor(output->dev->drm.fd, output->crtc_id, handle, w, h); 956 drmModeSetCursor(output->dev->drm.fd, output->crtc_id, handle, w, h);
955} 957}
956 958