From 6089580687e2ac427cd7ea4dfdd1234a5bd7e3db Mon Sep 17 00:00:00 2001 From: Alan Boudreault Date: Thu, 16 Aug 2012 11:43:27 -0400 Subject: [PATCH] mapserver: add patch for pixmap symbol Closes Homebrew/homebrew#14234. Signed-off-by: Jack Nagel --- Formula/mapserver.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Formula/mapserver.rb b/Formula/mapserver.rb index dd1a953ac7..6c81665f5f 100644 --- a/Formula/mapserver.rb +++ b/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 ); + }