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:
coppro
2007-05-18 19:11:40 +00:00
parent 0b05d97ed6
commit 1c687fdc96
5 changed files with 18 additions and 13 deletions
+14 -9
View File
@@ -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();