fix potential crash accessing de-allocated temporary memory

Not sure if anyone uses the scale feature, but there's a potential crash accessing out-of-scope temporary memory when writing a scaled 32-bit EXR file I noticed when working on my image engine for my little CTL compiler.