diff options
author | David Robillard <d@drobilla.net> | 2022-06-08 19:47:57 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-06-08 19:48:13 -0400 |
commit | bb0fe3975df149eb45a21e39940f71e2273c8fd5 (patch) | |
tree | d22278475d58083a1901a36491bb8a65b9947497 /src | |
parent | d0e913a0668fe8543d3a1ed70585f018fc8053c8 (diff) | |
download | pugl-bb0fe3975df149eb45a21e39940f71e2273c8fd5.tar.gz pugl-bb0fe3975df149eb45a21e39940f71e2273c8fd5.tar.bz2 pugl-bb0fe3975df149eb45a21e39940f71e2273c8fd5.zip |
Fix potential null pointer dereference
According to clang-tidy anyway, I'm not seeing it.
Diffstat (limited to 'src')
-rw-r--r-- | src/x11.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1403,7 +1403,7 @@ dispatchX11Events(PuglWorld* const world) continue; } - PuglView* view = findView(world, xevent.xany.window); + PuglView* const view = findView(world, xevent.xany.window); if (!view) { continue; } @@ -1448,14 +1448,14 @@ dispatchX11Events(PuglWorld* const world) break; case PUGL_FOCUS_IN: // Set the input context focus - if (impl->xic) { - XSetICFocus(impl->xic); + if (view->impl->xic) { + XSetICFocus(view->impl->xic); } break; case PUGL_FOCUS_OUT: // Unset the input context focus - if (impl->xic) { - XUnsetICFocus(impl->xic); + if (view->impl->xic) { + XUnsetICFocus(view->impl->xic); } break; default: |