Added checks for HDC being created before doing invalid area decomposition