forked from len0rd/rockbox
rbutil: fix segfault if there is no rbutil.ini. It terminates now nicely.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13728 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
34b0ca4983
commit
0350bf2252
1 changed files with 7 additions and 0 deletions
|
@ -138,6 +138,13 @@ bool rbutilFrmApp::ReadGlobalConfig(rbutilFrm* myFrame)
|
|||
}
|
||||
}
|
||||
|
||||
if (! wxFileExists(buf) )
|
||||
{
|
||||
gv->ErrStr = new wxString(wxT("Configuration file doesnt exist!"));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
wxFileInputStream* cfgis = new wxFileInputStream(buf);
|
||||
|
||||
if (!cfgis->CanRead()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue