summaryrefslogtreecommitdiff
path: root/rbutil
diff options
context:
space:
mode:
authorDominik Wenger <domonoky@googlemail.com>2007-06-27 18:21:55 +0000
committerDominik Wenger <domonoky@googlemail.com>2007-06-27 18:21:55 +0000
commit0350bf225234ca22460a758e9e7d007236256efc (patch)
treeec65eea82e124f9846eba6deca8b5d68c4e60874 /rbutil
parent34b0ca49838fc3e21f823e086e61983ba23a014c (diff)
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
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/rbutilApp.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/rbutil/rbutilApp.cpp b/rbutil/rbutilApp.cpp
index f3de467106..b95dfd1e3a 100644
--- a/rbutil/rbutilApp.cpp
+++ b/rbutil/rbutilApp.cpp
@@ -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()) {