From 60041df5b4d0a6c67097f2dc7546b7f0d80eac9f Mon Sep 17 00:00:00 2001 From: dibenedetto Date: Mon, 27 Apr 2009 10:00:53 +0000 Subject: [PATCH] initialized material texture index to -1. --- wrap/io_trimesh/import_obj.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wrap/io_trimesh/import_obj.h b/wrap/io_trimesh/import_obj.h index 83cbd5b3..c0005a86 100644 --- a/wrap/io_trimesh/import_obj.h +++ b/wrap/io_trimesh/import_obj.h @@ -879,6 +879,7 @@ static bool LoadMask(const char * filename, int &mask) materials.clear(); Material currentMaterial; + currentMaterial.index = -1; bool first = true; while (!stream.eof()) @@ -897,6 +898,7 @@ static bool LoadMask(const char * filename, int &mask) { materials.push_back(currentMaterial); currentMaterial = Material(); + currentMaterial.index = -1; } else first = false;