Skip to content

Commit 5a6b235

Browse files
authored
fix: skip ExclusiveModeAPI resolution to prevent Linux segfault (#3705)
1 parent c06fc8f commit 5a6b235

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

jsHelper/spicetifyWrapper.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,12 +326,14 @@ window.Spicetify = {
326326
setTimeout(addMissingPlatformAPIs, 50);
327327
return;
328328
}
329+
const os = Spicetify.Platform.operatingSystem;
329330
const version = Spicetify.Platform.version.split(".").map((i) => Number.parseInt(i, 10));
330331
if (version[0] === 1 && version[1] === 2 && version[2] < 38) return;
331332

332333
for (const [key, _] of Spicetify.Platform.Registry._map.entries()) {
333334
if (typeof key?.description !== "string" || !key?.description.endsWith("API")) continue;
334335
const symbolName = key.description;
336+
if (symbolName === "ExclusiveModeAPI" && os === "Linux") continue;
335337
if (Object.hasOwn(Spicetify.Platform, symbolName)) continue;
336338
try {
337339
const resolvedAPI = Spicetify.Platform.Registry.resolve(key);

0 commit comments

Comments
 (0)