Issue #24802:correctly handle null pLocationid
Merge pull request #1969 from garyhgohoos/24802

Issue #24802:correctly handle null pLocationid