mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Fix #10: Use of saturate function almost always causes a crash.
saturate: fix possible division by 0 SaturateImage: fix: had two 'image' members, one inherited, one nullptr, which caused a crash git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1458 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -228,9 +228,6 @@ Image EnlargeImage::generate(const Options& opt) const {
|
||||
// done
|
||||
return larger;
|
||||
}
|
||||
ImageCombine EnlargeImage::combine() const {
|
||||
return image->combine();
|
||||
}
|
||||
bool EnlargeImage::operator == (const GeneratedImage& that) const {
|
||||
const EnlargeImage* that2 = dynamic_cast<const EnlargeImage*>(&that);
|
||||
return that2 && *image == *that2->image
|
||||
@@ -242,9 +239,6 @@ bool EnlargeImage::operator == (const GeneratedImage& that) const {
|
||||
Image CropImage::generate(const Options& opt) const {
|
||||
return image->generate(opt).Size(wxSize((int)width, (int)height), wxPoint(-(int)offset_x, -(int)offset_y));
|
||||
}
|
||||
ImageCombine CropImage::combine() const {
|
||||
return image->combine();
|
||||
}
|
||||
bool CropImage::operator == (const GeneratedImage& that) const {
|
||||
const CropImage* that2 = dynamic_cast<const CropImage*>(&that);
|
||||
return that2 && *image == *that2->image
|
||||
@@ -340,9 +334,6 @@ Image DropShadowImage::generate(const Options& opt) const {
|
||||
delete[] shadow;
|
||||
return img;
|
||||
}
|
||||
ImageCombine DropShadowImage::combine() const {
|
||||
return image->combine();
|
||||
}
|
||||
bool DropShadowImage::operator == (const GeneratedImage& that) const {
|
||||
const DropShadowImage* that2 = dynamic_cast<const DropShadowImage*>(&that);
|
||||
return that2 && *image == *that2->image
|
||||
|
||||
Reference in New Issue
Block a user