Making sure XMLDocument pointer is set to NULL to allow for a proper check in later for an associated pointer.

This commit is contained in:
Patrick Shriwise 2019-01-22 13:22:55 -06:00
parent 3c743cb5e2
commit 023be82e01

View file

@ -520,13 +520,16 @@ contains
! Display output message
call write_message("Reading materials XML file...", 5)
doc % ptr = C_NULL_PTR
#ifdef DAGMC
if (dagmc) then
doc % ptr = read_uwuw_materials()
end if
#endif
if (.not. c_associated(doc % ptr)) then
#endif
! Check if materials.xml exists
filename = trim(path_input) // "materials.xml"
@ -539,9 +542,7 @@ contains
! Parse materials.xml file
call doc % load_file(filename)
#ifdef DAGMC
end if
#endif
root = doc % document_element()
call read_materials(root % ptr)