submodule: check alloc and name presense
Merge pull request #1763 from nvloff/nameless_submodule_segfault

submodule: check alloc and name presence