summaryrefslogtreecommitdiff
path: root/src/qcommon
diff options
context:
space:
mode:
authorZack Middleton <zturtleman@gmail.com>2015-07-12 19:31:37 -0500
committerTim Angus <tim@ngus.net>2016-04-07 11:02:30 +0100
commitcd50d8d2e7d1085808b15e9e4be66a52289df013 (patch)
treef144203b7ea27d2b4ae0c48515eeb9fadd8b70dc /src/qcommon
parentfbcc2c5f397b8933be620221a266cb963df9b61e (diff)
Don't segfault in FS_CreatePath when there are no path seperators
Diffstat (limited to 'src/qcommon')
-rw-r--r--src/qcommon/files.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qcommon/files.c b/src/qcommon/files.c
index 576ad9d2..cedbeaf4 100644
--- a/src/qcommon/files.c
+++ b/src/qcommon/files.c
@@ -511,7 +511,9 @@ qboolean FS_CreatePath (char *OSPath) {
// Skip creation of the root directory as it will always be there
ofs = strchr( path, PATH_SEP );
- ofs++;
+ if ( ofs != NULL ) {
+ ofs++;
+ }
for (; ofs != NULL && *ofs ; ofs++) {
if (*ofs == PATH_SEP) {