Fixed zoom crash;

Fixed crash when mising symbol font

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@725 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-09-21 10:13:57 +00:00
parent 67cb6120d5
commit f60e929d78
3 changed files with 7 additions and 4 deletions
+4 -2
View File
@@ -85,9 +85,11 @@ Image conform_image(const Image& img, const GeneratedImage::Options& options) {
// ----------------------------------------------------------------------------- : BlankImage
Image BlankImage::generate(const Options& opt) const {
Image img(opt.width, opt.height);
int w = max(1, opt.width >= 0 ? opt.width : opt.height);
int h = max(1, opt.height >= 0 ? opt.height : opt.width);
Image img(w, h);
img.InitAlpha();
memset(img.GetAlpha(), 0, opt.width * opt.height);
memset(img.GetAlpha(), 0, w * h);
return img;
}
bool BlankImage::operator == (const GeneratedImage& that) const {