summaryrefslogtreecommitdiff
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-04 11:53:09 -0400
commitdd5c716716beb639417c2c1b5111f04e47bcda41 (patch)
tree63358a692827495a79d3192ab57e6f04198bb62e
parent6f46497f534df88d85f6f328ba9a959dbe1b9f6a (diff)
downloadefl-dd5c716716beb639417c2c1b5111f04e47bcda41.tar.gz
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>
-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)
EINA_SAFETY_ON_NULL_RETURN(output);
output->need_repaint = EINA_FALSE;
+ if (!output->enabled) return;
ecore_drm_output_cursor_size_set(output, 0, 0, 0);
ecore_drm_output_dpms_set(output, DRM_MODE_DPMS_OFF);
}
@@ -951,6 +952,7 @@ EAPI void
ecore_drm_output_cursor_size_set(Ecore_Drm_Output *output, int handle, int w, int h)
{
EINA_SAFETY_ON_NULL_RETURN(output);
+ if (!output->enabled) return;
drmModeSetCursor(output->dev->drm.fd, output->crtc_id, handle, w, h);
}