You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by gb...@apache.org on 2010/03/03 14:00:59 UTC
svn commit: r918456 -
/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTextInputSkin.java
Author: gbrown
Date: Wed Mar 3 13:00:59 2010
New Revision: 918456
URL: http://svn.apache.org/viewvc?rev=918456&view=rev
Log:
Fix potential NPE in TerraTextInputSkin.
Modified:
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTextInputSkin.java
Modified: pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTextInputSkin.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTextInputSkin.java?rev=918456&r1=918455&r2=918456&view=diff
==============================================================================
--- pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTextInputSkin.java (original)
+++ pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTextInputSkin.java Wed Mar 3 13:00:59 2010
@@ -1424,7 +1424,7 @@
int selectionLength = textInput.getSelectionLength();
TextNode textNode = textInput.getTextNode();
- int n = textNode.getCharacterCount();
+ int n = (textNode == null) ? 0 : textNode.getCharacterCount();
Bounds leadingSelectionBounds;
if (selectionStart < n) {