libgui: Add null pointer check in setDisplaySurface am: eddbef88cf
am: 8663a03444

Change-Id: I9ddce6a3f72111aad068bbd13f3618589cbd87fd