aboutsummaryrefslogtreecommitdiff
path: root/xcursor
diff options
context:
space:
mode:
authorPhilipp Ludwig <git-devel@philippludwig.net>2018-11-27 23:19:26 +0100
committeremersion <contact@emersion.fr>2018-11-27 23:19:26 +0100
commite7fba556a8237cb048fa157f5ec068fa20d80a55 (patch)
treecba9a825752d139af3c08da62b6d030e6d99ebd2 /xcursor
parent05bb44078667a11216611a8fbe87c5fe69e117f8 (diff)
xcursor: fix crash when encountering cursor themes with circular dependencies
Port of https://cgit.freedesktop.org/xorg/lib/libXcursor/commit/src?id=f64a8cc1a65dcad4294e2988b402a34175019663
Diffstat (limited to 'xcursor')
-rw-r--r--xcursor/xcursor.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/xcursor/xcursor.c b/xcursor/xcursor.c
index 6690da1a..d9fcac93 100644
--- a/xcursor/xcursor.c
+++ b/xcursor/xcursor.c
@@ -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))
- f = XcursorScanTheme (i, name);
+ {
+ 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;