Skip to content

Commit

Permalink
fix assertion error when loading svg symbol from labelcache
Browse files Browse the repository at this point in the history
fixes #4247
@woodbri please confirm, as the SVG loading code has changed since you
submitted this patch
  • Loading branch information
tbonfort committed Apr 6, 2012
1 parent 6605f96 commit 45e9f54
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions mapsymbol.c
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,15 @@ int msGetMarkerSize(symbolSetObj *symbolset, styleObj *style, double *width, dou
if (MS_SUCCESS != msPreloadImageSymbol(MS_MAP_RENDERER(symbolset->map), symbol))
return MS_FAILURE;
}
if(symbol->type == MS_SYMBOL_SVG && !symbol->renderer_cache) {
#ifdef USE_SVG_CAIRO
if(MS_SUCCESS != msPreloadSVGSymbol(symbol))
return MS_FAILURE;
#else
msSetError(MS_SYMERR, "SVG symbol support is not enabled.", "msGetMarkerSize()");
return MS_FAILURE;
#endif
}
if(style->size == -1) {
size = ( msSymbolGetDefaultSize(symbol) * scalefactor );
}
Expand Down

0 comments on commit 45e9f54

Please sign in to comment.