mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
MSVC: Fix some potential divide-by-zero errors
This commit is contained in:
parent
4d496bc44f
commit
dde6b96ebe
2 changed files with 4 additions and 4 deletions
|
|
@ -176,8 +176,8 @@ public:
|
|||
void paint (Graphics& g) override
|
||||
{
|
||||
g.setOpacity (1.0f);
|
||||
g.drawImageTransformed (image, AffineTransform::scale (getWidth() / (float) image.getWidth(),
|
||||
getHeight() / (float) image.getHeight()), false);
|
||||
g.drawImageTransformed (image, AffineTransform::scale (getWidth() / (float) jmax (1, image.getWidth()),
|
||||
getHeight() / (float) jmax (1, image.getHeight())), false);
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -4641,8 +4641,8 @@ void* CustomMouseCursorInfo::create() const
|
|||
{
|
||||
im = im.rescaled (maxW, maxH);
|
||||
|
||||
hotspotX = (hotspotX * maxW) / image.getWidth();
|
||||
hotspotY = (hotspotY * maxH) / image.getHeight();
|
||||
hotspotX = (hotspotX * maxW) / juce::jmax (1, image.getWidth());
|
||||
hotspotY = (hotspotY * maxH) / juce::jmax (1, image.getHeight());
|
||||
}
|
||||
|
||||
return IconConverters::createHICONFromImage (im, FALSE, hotspotX, hotspotY);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue