xcursor: fix crash when encountering cursor themes with circular dependencies
Port of
@@ -839,7 +839,12 @@ XcursorScanTheme (const char *theme, const char *name)
* Recurse to scan inherited themes
*/
for (i = inherits; i && f == NULL; i = _XcursorNextPath (i))
+ {
+ if (strcmp(i, theme) != 0)
f = XcursorScanTheme (i, name);
+ else
+ printf("Not calling XcursorScanTheme because of circular dependency: %s. %s", i, name);
+ }
if (inherits != NULL)
free (inherits);
return f;
