industry.h
changeset 1330 8a67d04016ce
parent 1267 cbd68e5e31ac
child 2186 461a2aff3486
--- a/industry.h	Sun Feb 06 22:25:27 2005 +0000
+++ b/industry.h	Sun Feb 06 22:36:08 2005 +0000
@@ -32,6 +32,14 @@
 extern MemoryPool _industry_pool;
 
 /**
+ * Check if an Industry really exists.
+ */
+static inline bool IsValidIndustry(Industry* industry)
+{
+	return industry->xy != 0; /* XXX: Replace by INVALID_TILE someday */
+}
+
+/**
  * Get the pointer to the industry with index 'index'
  */
 static inline Industry *GetIndustry(uint index)