Small patch by vincele adding a couple safety checks and removing an unnecessary bit of code form planet panel layout.

git-svn-id: svn://svn.code.sf.net/p/freeorion/code/trunk@7715 dbd5520b-6a0a-0410-a553-f54834df5b05