Skip to content

Commit c5a1796

Browse files
committed
Fix a null handling bug in Style.scala
1 parent f0cc8bf commit c5a1796

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

geoscript/src/main/scala/style/Style.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
package org.geoscript
2-
package style.combinators
1+
package org.geoscript.style
2+
package combinators
33

4-
import filter._
4+
import org.geoscript.filter._
55
import scala.collection.JavaConversions._
66

77
sealed abstract trait Style {
@@ -136,7 +136,7 @@ case class CompositeStyle(styles: Seq[Style]) extends Style {
136136
}
137137

138138
object Paint {
139-
import geocss.CssOps.colors
139+
import org.geoscript.geocss.CssOps.colors
140140

141141
implicit def stringToPaint(colorName: String): Paint =
142142
if (colors contains colorName)
@@ -260,7 +260,7 @@ case class Label(
260260
val symbolizers = {
261261
val sym = factory.createTextSymbolizer()
262262
sym.setLabel(text)
263-
sym.setGeometry(geometry)
263+
sym.setGeometry(if (geometry == null) null else geometry)
264264
Seq(sym)
265265
}
266266
def zIndex = 0

0 commit comments

Comments
 (0)