check if closing something is actually possible before attempting to do so
Merge pull request #5539 from BevapDin/fix-door-crash

Fix closing non-closeable things