When Geany has no document loaded and I type ctrl-w, the line
12:57:10: Geany CRITICAL : on_close1_activate: assertion `doc != NULL' failed
is added to the Debug Messages dialog. Since no document is loaded, the corresponding menu item is disabled, but ctrl-w is still being recognized.
Geany 1.23 (git >= f439a5b), en_US.UTF-8