From ddc4cad73bc0e8e0ea2cfdda9891cffac6c9c8d8 Mon Sep 17 00:00:00 2001 From: expwnent Date: Sun, 7 Apr 2013 13:17:00 -0400 Subject: [PATCH] autoSyndrome: fixed a bug when a reaction didn't have a valid mat_index. --- plugins/autoSyndrome.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/autoSyndrome.cpp b/plugins/autoSyndrome.cpp index 488ac08db..a07de51a1 100644 --- a/plugins/autoSyndrome.cpp +++ b/plugins/autoSyndrome.cpp @@ -120,7 +120,6 @@ DFhackCExport command_result plugin_init(color_ostream& out, vectoritem_type); if ( bob->item_type != df::enums::item_type::BOULDER ) continue; - //for now don't worry about subtype + if ( bob->mat_index < 0 ) + continue; + + //for now don't worry about subtype df::inorganic_raw* inorganic = df::global::world->raws.inorganics[bob->mat_index]; for ( size_t b = 0; b < inorganic->material.syndrome.size(); b++ ) {