- LYXERR(Debug::GRAPHICS, "\n\tparams.scale : " << params.scale
- << "\n\twidth : " << w
- << "\n\theight : " << h);
+#if (QT_VERSION >= 0x040500) && (QT_VERSION <= 0x040502)
+ // Due to a bug in Qt, LyX will crash for certain
+ // scaling factors and sizes of the image.
+ // see bug #5957: http://www.lyx.org/trac/ticket/5957
+ scale += 0.0001;
+#endif