re PR libgcj/21064 ([4.0 only] StyleContext.addStyle causes NullPointerException)

2005-04-19  Roman Kennke  <roman@kennke.org>

	PR libgcj/21064
	* javax/swing/text/StyleContext.java
	(NamedStyle.setResolveParent): Added null
	pointer check.

From-SVN: r98402
This commit is contained in:
Roman Kennke 2005-04-19 10:52:03 +00:00 committed by Michael Koch
parent 69ae1f74fe
commit 6384325b3a
2 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2005-04-19 Roman Kennke <roman@kennke.org>
PR libgcj/21064
* javax/swing/text/StyleContext.java
(NamedStyle.setResolveParent): Added null
pointer check.
2005-04-19 Michael Koch <konqueror@gmx.de> 2005-04-19 Michael Koch <konqueror@gmx.de>
* java/rmi/server/RemoteObject.java: * java/rmi/server/RemoteObject.java:

View File

@ -203,7 +203,11 @@ public class StyleContext
public void setResolveParent(AttributeSet parent) public void setResolveParent(AttributeSet parent)
{ {
attributes = StyleContext.this.addAttribute(attributes, ResolveAttribute, parent); if (parent != null)
{
attributes = StyleContext.this.addAttribute
(attributes, ResolveAttribute, parent);
}
fireStateChanged(); fireStateChanged();
} }