Guard against empty polygons


Amends 05be1624423789148bd8e7beb74667a29ba12509
which added the same guard only for polylines.

The missing guard caused a crash in our baseline test.

Credit to OSS-Fuzz which independently found this as
issue 399769595.

Pick-to: 6.9 6.9.0 6.8 6.8.3
Change-Id: Ibf150b3cf9d31efce1f658d6b2e53ce82eb33382
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
commit8fdfbd940e1112e01a144abae1ebf43cc8a21dbc
parentf4c990bc6b5159d5c5079609a9b10e87459a4b09
authorRobert Löhning <robert.loehning@qt.io>
committerRobert Löhning <robert.loehning@qt.io>
commit timeFri, 7 Mar 2025 17:49:22 +0100