A part of Krita assistants' protocol is that the method adjustPosition(QPointF, QPointF) of an assistant can return (NaN, NaN) as a valid value, indicating that the assistant doesn't want to participate in the process of adjusting input. The KisPaintingAssistantsDecoration::adjustPosition(const QPointF&, const QPointF&) function, in turn, should either choose another assistant, if there is any, or return the position unchanged back to the caller. However, there is a case where this method doesn't check for NaN value, which then propagated all the way to the painting engine, resulting in the bug 402535.
This diff fixes the special case and so ensures that (NaN, NaN) is never returned by KisPaintingAssistantsDecoration::adjustPosition.