exception/error handling

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@137 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-12-21 22:09:42 +00:00
parent 2ba1d0b1b8
commit a9a93c07c3
4 changed files with 31 additions and 17 deletions
+7 -5
View File
@@ -153,11 +153,13 @@ bool ThumbnailThread::done(void* owner) {
// store image
r.first->store(r.second);
// store in cache
String filename = image_cache_dir() + safeFilename(r.first->cache_name) + _(".png");
r.second.SaveFile(filename, wxBITMAP_TYPE_PNG);
// set modification time
wxFileName fn(filename);
fn.SetTimes(0, &r.first->modified, 0);
if (r.second.Ok()) {
String filename = image_cache_dir() + safeFilename(r.first->cache_name) + _(".png");
r.second.SaveFile(filename, wxBITMAP_TYPE_PNG);
// set modification time
wxFileName fn(filename);
fn.SetTimes(0, &r.first->modified, 0);
}
// remove from name list
request_names.erase(r.first);
}