diff netinstall/postinstall.cc @ 452:3d3049ae1304 r21-2-41

Import from CVS: tag r21-2-41
author cvs
date Mon, 13 Aug 2007 11:40:21 +0200
parents 3078fd1074e8
children
line wrap: on
line diff
--- a/netinstall/postinstall.cc	Mon Aug 13 11:39:21 2007 +0200
+++ b/netinstall/postinstall.cc	Mon Aug 13 11:40:21 2007 +0200
@@ -102,13 +102,19 @@
   next_dialog = 0;
   char* cygroot = find_cygwin_root (&issystem);
   int i;
-  for (i=0; shells[i]; i++)
+
+  sh = 0;
+
+  if (cygroot)
     {
-      sh = backslash (concat (cygroot, shells[i], 0));
-      if (_access (sh, 0) == 0)
-	break;
-      free (sh);
-      sh = 0;
+      for (i=0; shells[i]; i++)
+	{
+	  sh = backslash (concat (cygroot, shells[i], 0));
+	  if (_access (sh, 0) == 0)
+	    break;
+	  free (sh);
+	  sh = 0;
+	}
     }
 
   char old_path[_MAX_PATH];