Skip to content

Commit dc99740

Browse files
committed
Fix trigger candidate action in bulk candidate list
1 parent 5d7338a commit dc99740

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

app/src/main/cpp/androidfrontend/androidfrontend.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,13 @@ class AndroidInputContext : public InputContextV2 {
227227
if (!actionable) return;
228228
if (idx >= list->size()) {
229229
const auto &bulk = list->toBulk();
230-
if (bulk && idx < bulk->totalSize()) {
231-
const auto &c = bulk->candidateFromAll(idx);
232-
actionable->triggerAction(c, actionIdx);
230+
if (bulk) {
231+
try {
232+
const auto &c = bulk->candidateFromAll(idx);
233+
actionable->triggerAction(c, actionIdx);
234+
} catch (const std::exception &e) {
235+
FCITX_WARN() << "triggerCandidateAction(" << idx << ") failed:" << e.what();
236+
}
233237
}
234238
} else {
235239
const auto &c = list->candidate(idx);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy