Skip to content

Commit

Permalink
Don't call XCloseDisplay on null object. Hopefully fixes Issue #335. (#…
Browse files Browse the repository at this point in the history
…337)

Co-authored-by: Dave Flogeras <[email protected]>
  • Loading branch information
dflogeras and Dave Flogeras authored Mar 8, 2024
1 parent 75a1f38 commit 81a5af8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/annotations/items/text/CapsLockStatusChecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ bool CapsLockStatusChecker::isCapsLockEnabled()
unsigned n;
XkbGetIndicatorState(display, XkbUseCoreKbd, &n);
capsState = (n & 0x01) == 1;
XCloseDisplay(display);
}
XCloseDisplay(display);
return capsState;
}
#else
return false;
#endif
}

} // namespace kImageAnnotator
} // namespace kImageAnnotator

0 comments on commit 81a5af8

Please sign in to comment.