From cbf3bae992265c501c6f1f1044a024aeeb59d318 Mon Sep 17 00:00:00 2001 From: frosch Date: Thu, 1 Sep 2011 19:40:51 +0000 Subject: [PATCH] (svn r22866) -Fix (r16396): Generic callbacks shall chain to the next GRF when the callback fails. --- src/newgrf_generic.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/newgrf_generic.cpp b/src/newgrf_generic.cpp index c76fcd6b03..90a11f8fb8 100644 --- a/src/newgrf_generic.cpp +++ b/src/newgrf_generic.cpp @@ -148,7 +148,7 @@ static uint16 GetGenericCallbackResult(uint8 feature, ResolverObject *object, co const SpriteGroup *group = it->group; object->grffile = it->file; group = SpriteGroup::Resolve(group, object); - if (group == NULL) continue; + if (group == NULL || group->GetCallbackResult() == CALLBACK_FAILED) continue; /* Return NewGRF file if necessary */ if (file != NULL) *file = it->file;