forked from mia/Aegisub
Fix #892, LuaScriptReader wasn't checking if opening the file actually succeeded.
Check, and throw an exception if it fails. Originally committed to SVN as r3065.
This commit is contained in:
parent
bab71db434
commit
e0a3aeca3d
1 changed files with 2 additions and 0 deletions
|
@ -49,6 +49,8 @@ namespace Automation4 {
|
||||||
#else
|
#else
|
||||||
f = fopen(filename.fn_str(), "rb");
|
f = fopen(filename.fn_str(), "rb");
|
||||||
#endif
|
#endif
|
||||||
|
if (!f)
|
||||||
|
throw _T("Could not open script file");
|
||||||
first = true;
|
first = true;
|
||||||
databuf = new char[bufsize];
|
databuf = new char[bufsize];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue