src/station_gui.cpp
changeset 6691 e8c27a509894
parent 6690 d037c31fd4cf
child 6719 4cc327ad39d5
child 6916 e87d54a598ea
--- a/src/station_gui.cpp	Fri Mar 23 20:51:42 2007 +0000
+++ b/src/station_gui.cpp	Fri Mar 23 20:55:45 2007 +0000
@@ -674,7 +674,16 @@
 	if (num == 0) return;
 
 	const CargoSpec *cs = GetCargo(i);
-	SpriteID sprite = cs->sprite;
+	SpriteID sprite;
+
+	if (cs->sprite == 0xFFFF) {
+		/* A value of 0xFFFF indicates we should draw a custom icon */
+		sprite = GetCustomCargoSprite(cs);
+	} else {
+		sprite = cs->sprite;
+	}
+
+	if (sprite == 0) return;
 
 	do {
 		DrawSprite(sprite, PAL_NONE, x, y);