forked from enlightenment/efl
ecore-drm: Default output to NULL and add safety check for NULL output
after the device loop. Summary: If there are no outputs created during the loop, we would end up crashing here by checking output->watch. This fixes that situation without leaking resources because we still end up doing our cleanup. NB: Thanks Cedric for the report !! :) @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
01a487d881
commit
6cf9246ad6
|
@ -647,7 +647,7 @@ EAPI Eina_Bool
|
|||
ecore_drm_outputs_create(Ecore_Drm_Device *dev)
|
||||
{
|
||||
Eina_Bool ret = EINA_TRUE;
|
||||
Ecore_Drm_Output *output;
|
||||
Ecore_Drm_Output *output = NULL;
|
||||
drmModeConnector *conn;
|
||||
drmModeRes *res;
|
||||
drmModeCrtc *crtc;
|
||||
|
@ -737,7 +737,7 @@ ecore_drm_outputs_create(Ecore_Drm_Device *dev)
|
|||
/* free resources */
|
||||
drmModeFreeResources(res);
|
||||
|
||||
if (!output->watch)
|
||||
if ((output) && (!output->watch))
|
||||
{
|
||||
int events = 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue