fixed nullpointer in legend module if layer is not available
Merge pull request #9 from lat-lon/master

Merge
Merge pull request #10 from lat-lon/nullPointerLegend

Null pointer legend