move assert to the beginning of the function
move assert to the beginning of the function

Change-Id: I807f91a72f25c900cf7c1c0387145b5eab68dafa

LibreOffice/libetonyek,LibreOffice/libetonyek,LibreOffice/libetonyek