StreamingRenderer throwing NullpointerException after GEOT-6207

Description

After updating GeoTools we noticed some new nullpointer exceptions. This behaviour seems to originate from PR#2219 (https://github.com/geotools/geotools/pull/2219#discussion_r284169896).

Setting the field "theImage" to null seems to trigger NullpointerExceptions while rendering.

See attached file `WmsTest.java` for a example setup that produces this exception.
Running this with Geotools 20.3 produces the following output:

Environment

None

Assignee

Unassigned

Reporter

Leif LislegÄrd

Triage

None

Components

Priority

Medium
Configure