Skip to content

Commit f373e07

Browse files
committed
WM (Linux): don't crash if no wm is detected
1 parent 89e4403 commit f373e07

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/detection/wm/wm_linux.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,13 @@ static void getHyprland(FFstrbuf* result, FF_MAYBE_UNUSED FFWMOptions* options)
2222

2323
const char* ffDetectWMVersion(const FFstrbuf* wmName, FFstrbuf* result, FFWMOptions* options)
2424
{
25+
if (!wmName)
26+
return "No WM detected";
27+
2528
if (ffStrbufEqualS(wmName, FF_WM_PRETTY_HYPRLAND))
2629
getHyprland(result, options);
2730
else
2831
return "Unsupported WM";
32+
2933
return NULL;
3034
}

0 commit comments

Comments
 (0)