From aea6ef94bc29b67c773eb9499fc1a37a75792298 Mon Sep 17 00:00:00 2001 From: rubidium Date: Thu, 17 May 2007 12:06:47 +0000 Subject: (svn r9861) -Fix: null pointer derefence under MorphOS and AmigaOS. --- src/unix.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/unix.cpp b/src/unix.cpp index 72ac0db12..43429778d 100644 --- a/src/unix.cpp +++ b/src/unix.cpp @@ -53,7 +53,7 @@ bool FiosIsRoot(const char *path) #else /* On MorphOS or AmigaOS paths look like: "Volume:directory/subdirectory" */ const char *s = strchr(path, ':'); - return s[1] == '\0'; + return s != NULL && s[1] == '\0'; #endif } -- cgit v1.2.3-54-g00ecf