Skip to content

Shape.stroke_=(v: Paint) doesn't accept null as v #241

Description

@MamoruAsagami

stroke's initial default value is null to mean no stroke.
But, Shape.stroke = null gets null pointer exception at scalafx.scene.shape.Shape.stroke_$eq(Shape.scala:129).

The Shape.stroke_= has the following code.

127 def stroke_=(v: Paint) {
128 println(s"stroke_=(${v})")
129 stroke() = v.delegate
130 }

But, line 129 should be as follows to accept null.

129 stroke() = if(v != null) v.delegate else null

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions