randr: check NULL before dereference

Fixes CID 1181926
This commit is contained in:
Sebastian Dransfeld 2014-02-24 09:17:25 +01:00
parent 54950b40ad
commit 43aed04241
1 changed files with 2 additions and 1 deletions

View File

@ -934,7 +934,8 @@ done:
free(possible);
free(modes);
output->cfg->crtc = crtc->xid;
if (crtc)
output->cfg->crtc = crtc->xid;
return crtc;
error: