Revise descriptor stuff.
descriptor.c(h) was broken by the commit
	2da1668f4c7d7871a7212db10af606a7e646abd6
and it now causes a crash bug.
Instead of reverting the change revising the stuff completely.
Remove unsed dialog which was added by mistake.
Remove duplicated line in snprintf() which causes a crash introduced by
the commit 1177281049e8bb3df5992da5dc1ca31ad892082e.
Add a check for NULL dereference pointed out by Pluto Cobain.
It's for safety though I don't think it would occur.