(svn r9861) -Fix: null pointer derefence under MorphOS and AmigaOS.
authorrubidium
Thu, 17 May 2007 12:06:47 +0000
changeset 7128 1f92a89c933e
parent 7127 8d8bb32f17f8
child 7129 60973c5cb78d
(svn r9861) -Fix: null pointer derefence under MorphOS and AmigaOS.
src/unix.cpp
--- a/src/unix.cpp	Wed May 16 21:28:23 2007 +0000
+++ b/src/unix.cpp	Thu May 17 12:06:47 2007 +0000
@@ -53,7 +53,7 @@
 #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
 }