From 61ae9bf581cee233b4b4d42abff5307da00da8f9 Mon Sep 17 00:00:00 2001 From: Alan Boudreault Date: Thu, 16 Aug 2012 11:43:27 -0400 Subject: mapserver: add patch for pixmap symbol Closes #14234. Signed-off-by: Jack Nagel --- Library/Formula/mapserver.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'Library') diff --git a/Library/Formula/mapserver.rb b/Library/Formula/mapserver.rb index dd1a953ac..6c81665f5 100644 --- a/Library/Formula/mapserver.rb +++ b/Library/Formula/mapserver.rb @@ -53,6 +53,8 @@ class Mapserver < Formula def patches # Fix clang compilation issue, remove on future release # See http://trac.osgeo.org/mapserver/changeset/12809 + # Fix msGetMarkerSize() called on unloaded pixmap symbol + # https://github.com/mapserver/mapserver/issues/4225 DATA end @@ -93,3 +95,18 @@ index 5ff3f20..7a14588 100644 //--------------------------------------------------------------------- int subpixel_width() const { return m_profile->subpixel_width(); } +diff --git a/mapsymbol.c b/mapsymbol.c +index 164a0ac..f9dcb20 100644 +--- a/mapsymbol.c ++++ b/mapsymbol.c +@@ -601,6 +601,10 @@ int msGetMarkerSize(symbolSetObj *symbolset, styleObj *style, int *width, int *h + } + + symbol = symbolset->symbol[style->symbol]; ++ if (symbol->type == MS_SYMBOL_PIXMAP && !symbol->pixmap_buffer) { ++ if (MS_SUCCESS != msPreloadImageSymbol(MS_MAP_RENDERER(symbolset->map), symbol)) ++ return MS_FAILURE; ++ } + if(style->size == -1) { + size = MS_NINT( msSymbolGetDefaultSize(symbol) * scalefactor ); + } -- cgit v1.2.3