2
0
Эх сурвалжийг харах

Update AMFImporter_Material.cpp

ihsinme 4 жил өмнө
parent
commit
070072370d

+ 5 - 5
code/AssetLib/AMF/AMFImporter_Material.cpp

@@ -165,15 +165,15 @@ void AMFImporter::ParseNode_Texture(XmlNode &node) {
 	std::string type = node.attribute("type").as_string();
 	std::string type = node.attribute("type").as_string();
 	bool tiled = node.attribute("tiled").as_bool();
 	bool tiled = node.attribute("tiled").as_bool();
 
 
-	// create new texture object.
-    AMFNodeElementBase *ne = new AMFTexture(mNodeElement_Cur);
-
-	AMFTexture& als = *((AMFTexture*)ne);// alias for convenience
-
     if (node.empty()) {
     if (node.empty()) {
 		return;
 		return;
     }
     }
 
 
+    // create new texture object.
+    AMFNodeElementBase *ne = new AMFTexture(mNodeElement_Cur);
+
+	AMFTexture& als = *((AMFTexture*)ne);// alias for convenience
+
     std::string enc64_data = node.value();
     std::string enc64_data = node.value();
 	// Check for child nodes
 	// Check for child nodes