Hitting assertion on getPhysicalPixelScaleFactor() in drawWithin()

I’m using Drawable::drawWithin() in my paint method and its hitting the assertion at

jassert (getPhysicalPixelScaleFactor() > 0.0f);

Any ideas why this might be happening? I’m on Mac.

No, no idea how it could possibly end up with an invalid scale!

Doh, I was using a ratio to to calculate the height from the width and had it the wrong way round…