comparison pidgin/win32/winpidgin.c @ 23667:bd789c20f577

Fix a crash in the win32 loader when %PATH% isn't set.
author Daniel Atallah <daniel.atallah@gmail.com>
date Wed, 30 Jul 2008 20:22:22 +0000
parents ab5b9acebde3
children 85189641a970
comparison
equal deleted inserted replaced
23666:c31012d6f708 23667:bd789c20f577
459 if (perl_path[strlen(perl_path) - 1] != '\\') { 459 if (perl_path[strlen(perl_path) - 1] != '\\') {
460 strcat(perl_path, "\\"); 460 strcat(perl_path, "\\");
461 } 461 }
462 strcat(perl_path, "bin"); 462 strcat(perl_path, "bin");
463 463
464 if (!strstr(path, perl_path)) { 464 if (path == NULL || !strstr(path, perl_path)) {
465 int newlen = (path ? strlen(path) : 0) + strlen(perl_path) + 10; 465 int newlen = (path ? strlen(path) : 0) + strlen(perl_path) + 10;
466 char *newpath = malloc(newlen); 466 char *newpath = malloc(newlen);
467 *newpath = '\0'; 467 *newpath = '\0';
468 468
469 _snprintf(newpath, newlen, "PATH=%s%s%s", 469 _snprintf(newpath, newlen, "PATH=%s%s%s",