6995769: occasion NPE thrown from SwingUtilities.computeIntersection()
Reviewed-by: alexp
--- a/jdk/src/share/classes/javax/swing/RepaintManager.java Mon Jul 18 18:21:31 2011 +0400
+++ b/jdk/src/share/classes/javax/swing/RepaintManager.java Thu Jul 28 18:13:17 2011 +0400
@@ -758,6 +758,11 @@
for(i=0 ; i < count ; i++) {
dirtyComponent = roots.get(i);
rect = tmpDirtyComponents.get(dirtyComponent);
+ // Sometimes when RepaintManager is changed during the painting
+ // we may get null here, see #6995769 for details
+ if (rect == null) {
+ continue;
+ }
localBoundsH = dirtyComponent.getHeight();
localBoundsW = dirtyComponent.getWidth();