mirror of https://github.com/odrling/Aegisub
Don't display an error when opening read-only formats
This commit is contained in:
parent
b5baacec2c
commit
6c2ccd8639
|
@ -189,8 +189,12 @@ void AssFile::SaveMemory(std::vector<char> &dst) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AssFile::CanSave() const {
|
bool AssFile::CanSave() const {
|
||||||
const SubtitleFormat *writer = SubtitleFormat::GetWriter(filename);
|
try {
|
||||||
return writer && writer->CanSave(this);
|
return SubtitleFormat::GetWriter(filename)->CanSave(this);
|
||||||
|
}
|
||||||
|
catch (...) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AssFile::Clear() {
|
void AssFile::Clear() {
|
||||||
|
|
Loading…
Reference in New Issue