evas software x11 - dri swapping - fix possible coverity bug

fix CID 1039620 - coverity is right, in theory.
This commit is contained in:
Carsten Haitzler 2016-07-11 21:29:32 +09:00
parent 1e6375cbe3
commit ea99e6288d
1 changed files with 5 additions and 0 deletions

View File

@ -193,6 +193,11 @@ _drm_init(Display *disp, int scr)
if (exim_debug) ERR("DRI2 connect failed on screen %i", scr);
goto err;
}
if (!dev_name)
{
if (exim_debug) ERR("DRI2 connect - cannot find dev name");
goto err;
}
drm_fd = open(dev_name, O_RDWR);
if (drm_fd < 0)
{