pointer: Fix a segfault in the focus logic