Core/LFG: Fix crash

Fix crash added in ab1d0512ea7818d64a63a514195dbd9644d284fb by adding an additional NULL check.
Fixes #11941
Merge branch 'master' of git://github.com/TrinityCore/TrinityCore