xrandr returns 0 outputs, then free resources and return null quickly.
Signed-off-by: Christopher Michael <cp.michael@samsung.com>
SVN revision: 83623
/* try to get crtc info */
if ((info = XRRGetCrtcInfo(_ecore_x_disp, res, crtc)))
{
+ /* if we have no outputs, return NULL */
+ if (info->noutput == 0)
+ {
+ /* free the crtc info */
+ XRRFreeCrtcInfo(info);
+
+ /* free the resources */
+ XRRFreeScreenResources(res);
+
+ return NULL;
+ }
+
/* try to allocate our return struct */
if ((ret = malloc(info->noutput * sizeof(Ecore_X_Randr_Output))))
{