summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-09-01 19:40:51 +0000
committerfrosch <frosch@openttd.org>2011-09-01 19:40:51 +0000
commitcbf3bae992265c501c6f1f1044a024aeeb59d318 (patch)
treeaa602a0f00c8661ae8dc4d45f8b10bd9fbed6b06 /src
parent406bea53034fda2786cba793535adacbaaedbe9b (diff)
downloadopenttd-cbf3bae992265c501c6f1f1044a024aeeb59d318.tar.xz
(svn r22866) -Fix (r16396): Generic callbacks shall chain to the next GRF when the callback fails.
Diffstat (limited to 'src')
-rw-r--r--src/newgrf_generic.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/newgrf_generic.cpp b/src/newgrf_generic.cpp
index c76fcd6b0..90a11f8fb 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;