Android: null pointer check

Task-number: QTBUG-41680
Change-Id: I740fb2a6df5613a8ee724b59dab08674a3337236
Reviewed-by: Kai Uwe Broulik <kde@privat.broulik.de>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
This commit is contained in:
Paul Olav Tvete 2014-10-08 09:51:10 +02:00
parent 8d8000b5fe
commit 7755b4af41

View File

@ -174,6 +174,9 @@ public class QtInputConnection extends BaseInputConnection
QtExtractedText qExtractedText = QtNativeInputConnection.getExtractedText(request.hintMaxChars,
request.hintMaxLines,
flags);
if (qExtractedText == null)
return null;
ExtractedText extractedText = new ExtractedText();
extractedText.partialEndOffset = qExtractedText.partialEndOffset;
extractedText.partialStartOffset = qExtractedText.partialStartOffset;