fix crash when subdir has no childs

Sometimes subdir tag may be in form ```<subdir name="somedir/" />```
so ```de->name``` is not set and access to it rises segmentation fault.
This is fast fix.