]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - libs/picomodel/picointernal.c
Merge commit '37bef590b1d2161b16b2bd33349fc8b56af60920' into master-merge
[xonotic/netradiant.git] / libs / picomodel / picointernal.c
index 0a8597f840416e107c87b2653da4e2765a561c0e..54866de101522a7440d3952a0b8cea1f22011a67 100644 (file)
@@ -602,12 +602,12 @@ int _pico_nofname( const char *path, char *dest, int destSize ){
  *  string otherwise. given 'path' is not altered. -sea
  */
 const char *_pico_nopath( const char *path ){
-       const char *src;
-       src = path + ( strlen( path ) - 1 );
-
        if ( path == NULL ) {
                return "";
        }
+       const char *src;
+       src = path + ( strlen( path ) - 1 );
+
        if ( !strchr( path,'/' ) && !strchr( path,'\\' ) ) {
                return ( path );
        }