exteral/freetype: improve -fsanitize=non-null-attribute fix
Quoting <https://gerrit.libreoffice.org/c/core/+/143098/2#message-
62ac4499370dd88eeb3181f52d817e831150c94d>:
> What we do in other such cases is not make it conditional on the
> pointer argument being non-null, but rather make it conditional on the
> length argument not being zero. That way, it only catches the
> "harmless" case of an "irrelevant" null pointer in combination with a
> zero length, and doesn't hide bugs where the pointer is erroneously null
> while the length is non-zero.
So check for the length and not for the pointer argument.
Change-Id: I1894eb67d49a9ae40cdce29de865172400a271dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143134
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>