Fix the NULL Pointer exception in application
Signed-off-by: Zheng Chai <zheng.chai@citrix.com>