aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-06-08 19:47:57 -0400
committerDavid Robillard <d@drobilla.net>2022-06-08 19:48:13 -0400
commitbb0fe3975df149eb45a21e39940f71e2273c8fd5 (patch)
treed22278475d58083a1901a36491bb8a65b9947497 /src
parentd0e913a0668fe8543d3a1ed70585f018fc8053c8 (diff)
downloadpugl-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.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/x11.c b/src/x11.c
index c7fdad2..deae154 100644
--- a/src/x11.c
+++ b/src/x11.c
@@ -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: