Resolves fdo#81549: Crash pivot table

Regression from http://cgit.freedesktop.org/libreoffice/core/commit/?id=345d6dd9d938a88722fb6d1f1963047a9761412d ?

Change-Id: Ie2ebef88bd8369065b8a4ab176099c71674d5090
Reviewed-on: https://gerrit.libreoffice.org/10410
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Tested-by: Kohei Yoshida <libreoffice@kohei.us>
(cherry picked from commit a82ff18269e5b37348d402b7c21c3f200068265c)