dispatch->glGetShaderiv(prog, GL_INFO_LOG_LENGTH, &size);
info = malloc(size);
-
- dispatch->glGetShaderInfoLog(prog, size, NULL, info);
- ErrorF("Failed to compile %s: %s\n",
- type == GL_FRAGMENT_SHADER ? "FS" : "VS", info);
- ErrorF("Program source:\n%s", source);
+ if (info) {
+ dispatch->glGetShaderInfoLog(prog, size, NULL, info);
+ ErrorF("Failed to compile %s: %s\n",
+ type == GL_FRAGMENT_SHADER ? "FS" : "VS", info);
+ ErrorF("Program source:\n%s", source);
+ free(info);
+ } else
+ ErrorF("Failed to get shader compilation info.\n");
FatalError("GLSL compile failure\n");
}
glamor_identify(0);
glamor_egl = calloc(sizeof(*glamor_egl), 1);
+ if (glamor_egl == NULL)
+ return FALSE;
if (xf86GlamorEGLPrivateIndex == -1)
xf86GlamorEGLPrivateIndex =
xf86AllocateScrnInfoPrivateIndex();
}
glamor_egl->display = eglGetDisplay(glamor_egl->gbm);
#else
- glamor_egl->display = eglGetDisplay((EGLNativeDisplayType)fd);
+ glamor_egl->display = eglGetDisplay((EGLNativeDisplayType)(intptr_t)fd);
#endif
glamor_egl->has_gem = glamor_egl_check_has_gem(fd);