forked from enlightenment/efl
ecore-drm: Fix potential segfault when setting output mode
If a NULL mode is passed into ecore_drm_output_mode_set, then we try to disable the given output. If disabling the output fails, we were trying to print an ERR message which tried to access the NULL mode. @fix Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
This commit is contained in:
parent
2f722f3db3
commit
d40cd1dab2
|
@ -1503,8 +1503,7 @@ ecore_drm_output_mode_set(Ecore_Drm_Output *output, Ecore_Drm_Output_Mode *mode,
|
|||
if (drmModeSetCrtc(dev->drm.fd, output->crtc_id,
|
||||
0, 0, 0, 0, 0, NULL) < 0)
|
||||
{
|
||||
ERR("Failed to set Mode %dx%d for Output %s: %m",
|
||||
mode->width, mode->height, output->name);
|
||||
ERR("Failed to turn off Output %s: %m", output->name);
|
||||
ret = EINA_FALSE;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue