Author: rwhitcomb Date: Mon Mar 24 18:12:29 2014 New Revision: 1580958 URL: http://svn.apache.org/r1580958 Log: PIVOT-938: Further checks in the vein of PIVOT-927, where sometimes the mouse location can be null. We still haven't quite figured out the underlying cause, but guarding against a null pointer access seems to work around the issue without causing too much harm.
This latest incarnation has to with displaying tooltips, where the mouse location can also get to be null. Modified: pivot/branches/2.0.x/wtk/src/org/apache/pivot/wtk/Component.java Modified: pivot/branches/2.0.x/wtk/src/org/apache/pivot/wtk/Component.java URL: http://svn.apache.org/viewvc/pivot/branches/2.0.x/wtk/src/org/apache/pivot/wtk/Component.java?rev=1580958&r1=1580957&r2=1580958&view=diff ============================================================================== --- pivot/branches/2.0.x/wtk/src/org/apache/pivot/wtk/Component.java (original) +++ pivot/branches/2.0.x/wtk/src/org/apache/pivot/wtk/Component.java Mon Mar 24 18:12:29 2014 @@ -2794,8 +2794,10 @@ public abstract class Component implemen @Override public void run() { Point mouseLocationLocal = getMouseLocation(); - componentTooltipListeners.tooltipTriggered(Component.this, - mouseLocationLocal.x, mouseLocationLocal.y); + if (mouseLocationLocal != null) { + componentTooltipListeners.tooltipTriggered(Component.this, + mouseLocationLocal.x, mouseLocationLocal.y); + } } }, tooltipDelay);