forked from mia/Aegisub
Don't display an error when opening read-only formats
This commit is contained in:
parent
b5baacec2c
commit
6c2ccd8639
1 changed files with 6 additions and 2 deletions
|
@ -189,8 +189,12 @@ void AssFile::SaveMemory(std::vector<char> &dst) {
|
|||
}
|
||||
|
||||
bool AssFile::CanSave() const {
|
||||
const SubtitleFormat *writer = SubtitleFormat::GetWriter(filename);
|
||||
return writer && writer->CanSave(this);
|
||||
try {
|
||||
return SubtitleFormat::GetWriter(filename)->CanSave(this);
|
||||
}
|
||||
catch (...) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void AssFile::Clear() {
|
||||
|
|
Loading…
Reference in a new issue