comparison src/browser.c @ 4187:56e07e5ccd9a

[gaim-migrate @ 4418] Drew Martin (acm4me) writes: "Fixes a bug in open_url() (browser.c) that causes gaim to crash if the user tries to open a link when their web_command variable is not set and web_browser is set to manual. Crash can be reproduced w/these two config settings: web_browser { 2 } web_command { } This patch is one half patch ID 659914 (which is a combined patch for both this and a new preference)." committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Fri, 03 Jan 2003 16:25:07 +0000
parents ebfb80bbe1ed
children c464dd315be4
comparison
equal deleted inserted replaced
4186:9615c6996348 4187:56e07e5ccd9a
623 args = g_new(char *, 4); 623 args = g_new(char *, 4);
624 args[0] = "mozilla"; 624 args[0] = "mozilla";
625 args[1] = url; 625 args[1] = url;
626 args[2] = NULL; 626 args[2] = NULL;
627 } else if (web_browser == BROWSER_MANUAL) { 627 } else if (web_browser == BROWSER_MANUAL) {
628 if(strcmp(web_command,"") == 0)
629 _exit(0);
628 gchar *space_free_url; 630 gchar *space_free_url;
629 space_free_url = g_strdelimit(url, " ", '+'); 631 space_free_url = g_strdelimit(url, " ", '+');
630 g_snprintf(command, sizeof(command), web_command, space_free_url); 632 g_snprintf(command, sizeof(command), web_command, space_free_url);
631 g_free(space_free_url); 633 g_free(space_free_url);
632 args = g_strsplit(command, " ", 0); 634 args = g_strsplit(command, " ", 0);