changeset 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 9615c6996348
children c464dd315be4
files src/browser.c src/gaimrc.c
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/browser.c	Fri Jan 03 16:23:29 2003 +0000
+++ b/src/browser.c	Fri Jan 03 16:25:07 2003 +0000
@@ -625,6 +625,8 @@
 				args[1] = url;
 				args[2] = NULL;
 			} else if (web_browser == BROWSER_MANUAL) {
+				if(strcmp(web_command,"") == 0)
+					_exit(0);
 				gchar *space_free_url;
 				space_free_url = g_strdelimit(url, " ", '+');
 				g_snprintf(command, sizeof(command), web_command, space_free_url);
--- a/src/gaimrc.c	Fri Jan 03 16:23:29 2003 +0000
+++ b/src/gaimrc.c	Fri Jan 03 16:25:07 2003 +0000
@@ -69,7 +69,7 @@
 int web_browser;
 struct save_pos blist_pos;
 struct window_size conv_size, buddy_chat_size;
-char web_command[2048];
+char web_command[2048] = "";
 char *sound_file[NUM_SOUNDS];
 #ifndef _WIN32
 char sound_cmd[2048];