Fixed NullPointer if legend image is not available.
Merge pull request #31 from lat-lon/legendImageUnavailableNPE

Fixed NullPointer if legend image is not available.