瀏覽代碼

removed a redundant NULL check in assimp editor of a pointer to an array declared in the same statement block

hbina085 6 年之前
父節點
當前提交
13680885b6
共有 1 個文件被更改,包括 1 次插入3 次删除
  1. 1 3
      modules/assimp/editor_scene_importer_assimp.cpp

+ 1 - 3
modules/assimp/editor_scene_importer_assimp.cpp

@@ -855,9 +855,7 @@ Ref<Material> EditorSceneImporterAssimp::_generate_material_from_index(ImportSta
 				Ref<Texture> texture = _load_texture(state, path);
 				Ref<Texture> texture = _load_texture(state, path);
 
 
 				if (texture != NULL) {
 				if (texture != NULL) {
-					if (map_mode != NULL) {
-						_set_texture_mapping_mode(map_mode, texture);
-					}
+					_set_texture_mapping_mode(map_mode, texture);
 					mat->set_feature(SpatialMaterial::Feature::FEATURE_NORMAL_MAPPING, true);
 					mat->set_feature(SpatialMaterial::Feature::FEATURE_NORMAL_MAPPING, true);
 					mat->set_texture(SpatialMaterial::TEXTURE_NORMAL, texture);
 					mat->set_texture(SpatialMaterial::TEXTURE_NORMAL, texture);
 				}
 				}