src/hg/lib/customTrack.c 1.180

1.180 2009/12/11 15:32:47 angie
Null check to prevent segv in command line runs (cgiScriptName returns NULL unless env var SCRIPT_NAME has been set).
Index: src/hg/lib/customTrack.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/lib/customTrack.c,v
retrieving revision 1.179
retrieving revision 1.180
diff -b -B -U 4 -r1.179 -r1.180
--- src/hg/lib/customTrack.c	9 Dec 2009 19:27:06 -0000	1.179
+++ src/hg/lib/customTrack.c	11 Dec 2009 15:32:47 -0000	1.180
@@ -869,9 +869,9 @@
         }
 if (newCts || removedCt || changedCt || ctConfigUpdate(ctFileName))
     customTracksSaveCart(genomeDb, cart, ctList);
 
-if (!endsWith(cgiScriptName(),"hgCustom"))
+if (cgiScriptName() && !endsWith(cgiScriptName(),"hgCustom"))
     {
     /* filter out cts that are unavailable remote resources */
     ctList = customTrackRemoveUnavailableFromList(ctList);
     }