Merge change 4374 into donut

* changes:
  Fixes a potential NPE in View.
This commit is contained in:
Android (Google) Code Review
2009-06-16 15:04:37 -07:00

View File

@@ -7157,9 +7157,11 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
getLocationInWindow(location); getLocationInWindow(location);
final AttachInfo info = mAttachInfo; final AttachInfo info = mAttachInfo;
if (info != null) {
location[0] += info.mWindowLeft; location[0] += info.mWindowLeft;
location[1] += info.mWindowTop; location[1] += info.mWindowTop;
} }
}
/** /**
* <p>Computes the coordinates of this view in its window. The argument * <p>Computes the coordinates of this view in its window. The argument