check TRG_HasMasterPage before TRG_GetMasterPage
check TRG_HasMasterPage before TRG_GetMasterPage

bff + valgrind

Change-Id: Ie08ddfe06dc0850cf44955cc9f9079b3856b19e3

JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core