mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Prevented some crashes from uncaught exceptions
Moved mse.ico to app.ico Fixed the Linux version of load_resource_icon(). git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@388 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
+14
-9
@@ -33,16 +33,21 @@ Image ScriptableImage::generate(const GeneratedImage::Options& options, bool cac
|
||||
// cached, so we are done
|
||||
return cached;
|
||||
}
|
||||
// generate
|
||||
Image image;
|
||||
// generate blank image
|
||||
Image image(1,1);
|
||||
image.InitAlpha();
|
||||
image.SetAlpha(0,0,0);
|
||||
if (isReady()) {
|
||||
image = value->generate(options);
|
||||
} else {
|
||||
// error, return blank image
|
||||
Image i(1,1);
|
||||
i.InitAlpha();
|
||||
i.SetAlpha(0,0,0);
|
||||
image = i;
|
||||
try {
|
||||
image = value->generate(options);
|
||||
}
|
||||
catch (FileNotFoundError e) {
|
||||
handle_error (e);
|
||||
return image;
|
||||
}
|
||||
}
|
||||
else {
|
||||
return image;
|
||||
}
|
||||
// resize?
|
||||
int iw = image.GetWidth(), ih = image.GetHeight();
|
||||
|
||||
Reference in New Issue
Block a user