mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Fix a crash in the dictionary due to releasing a null array.
This commit is contained in:
parent
1b62ff1a3d
commit
df4e0430de
@ -103,12 +103,14 @@ static int latinime_BinaryDictionary_getSuggestions(
|
||||
|
||||
int count = dictionary->getSuggestions(inputCodes, arraySize, (unsigned short*) outputChars, frequencies,
|
||||
maxWordLength, maxWords, maxAlternatives, skipPos, nextLetters, nextLettersSize);
|
||||
|
||||
|
||||
env->ReleaseIntArrayElements(frequencyArray, frequencies, 0);
|
||||
env->ReleaseIntArrayElements(inputArray, inputCodes, JNI_ABORT);
|
||||
env->ReleaseCharArrayElements(outputArray, outputChars, 0);
|
||||
env->ReleaseIntArrayElements(nextLettersArray, nextLetters, 0);
|
||||
|
||||
if (nextLetters) {
|
||||
env->ReleaseIntArrayElements(nextLettersArray, nextLetters, 0);
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user