projects
/
simgear.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
63730a6
)
Don't segfault when dir is empty
author
fredb
<fredb>
Tue, 16 Jan 2007 21:34:18 +0000
(21:34 +0000)
committer
fredb
<fredb>
Tue, 16 Jan 2007 21:34:18 +0000
(21:34 +0000)
simgear/misc/sg_path.cxx
patch
|
blob
|
history
diff --git
a/simgear/misc/sg_path.cxx
b/simgear/misc/sg_path.cxx
index 4cfc3576578eff19677f7d2249d89c6797c4b9e4..ce466142d163aaed77c6c640ea0b0d504b47278a 100644
(file)
--- a/
simgear/misc/sg_path.cxx
+++ b/
simgear/misc/sg_path.cxx
@@
-195,6
+195,8
@@
bool SGPath::exists() const {
void SGPath::create_dir( mode_t mode ) {
string_list dirlist = sgPathSplit(dir());
+ if ( dirlist.empty() )
+ return;
string path = dirlist[0];
string_list path_elements = sgPathBranchSplit(path);
bool absolute = !path.empty() && path[0] == sgDirPathSep;