diff --git a/release-notes/bugfixes/1-floating-crash-empty-workspace b/release-notes/bugfixes/1-floating-crash-empty-workspace new file mode 100644 index 00000000..81f14f09 --- /dev/null +++ b/release-notes/bugfixes/1-floating-crash-empty-workspace @@ -0,0 +1 @@ +fix crash when running floating command on empty workspace diff --git a/src/assignments.c b/src/assignments.c index b7034ac0..85827f3a 100644 --- a/src/assignments.c +++ b/src/assignments.c @@ -15,6 +15,10 @@ * */ void run_assignments(i3Window *window) { + if (!window) { + return; + } + DLOG("Checking if any assignments match this window\n"); bool needs_tree_render = false; diff --git a/testcases/t/554-crash-floating-enable.t b/testcases/t/554-crash-floating-enable.t new file mode 100644 index 00000000..fbbf1b47 --- /dev/null +++ b/testcases/t/554-crash-floating-enable.t @@ -0,0 +1,28 @@ +#!perl +# vim:ts=4:sw=4:expandtab +# +# Please read the following documents before working on tests: +# • https://build.i3wm.org/docs/testsuite.html +# (or docs/testsuite) +# +# • https://build.i3wm.org/docs/lib-i3test.html +# (alternatively: perldoc ./testcases/lib/i3test.pm) +# +# • https://build.i3wm.org/docs/ipc.html +# (or docs/ipc) +# +# • https://i3wm.org/downloads/modern_perl_a4.pdf +# (unless you are already familiar with Perl) +# +# Verify that i3 does not crash when a floating command is run and for_window +# rule exists. +# Ticket: #6561 +# Bug still in: 4.25-6-g0e2e8290 +use i3test i3_config => <