forked from enlightenment/efl
ecore_drm2 - fix startup if edid blob is null.. assume all 0's
this causes a crash when no edid is available. survive and dont crash. this causes e wayland to not work at all on my baytrail laptop. @fix
This commit is contained in:
parent
3de08599bf
commit
2c1e2db876
|
@ -1044,6 +1044,7 @@ ecore_drm2_output_edid_get(Ecore_Drm2_Output *output)
|
|||
{
|
||||
char *edid_str = NULL;
|
||||
unsigned char *blob;
|
||||
unsigned char fallback_blob[128];
|
||||
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(output, NULL);
|
||||
|
||||
|
@ -1054,6 +1055,11 @@ ecore_drm2_output_edid_get(Ecore_Drm2_Output *output)
|
|||
EINA_SAFETY_ON_NULL_RETURN_VAL(output->edid.blob, NULL);
|
||||
blob = output->edid.blob;
|
||||
}
|
||||
if (!blob)
|
||||
{
|
||||
memset(fallback_blob, 0, sizeof(fallback_blob));
|
||||
blob = fallback_blob;
|
||||
}
|
||||
|
||||
edid_str = malloc((128 * 2) + 1);
|
||||
if (edid_str)
|
||||
|
|
Loading…
Reference in New Issue