# HG changeset patch # User Luke Schierer # Date 1053923291 0 # Node ID c7221343782927679d6bf2ceed99c1d41c249a08 # Parent 166ed121e555637fc146a0b40299d2f8be37d697 [gaim-migrate @ 5928] Dario Sarango (darius_wolfson) writes: "Patch to fix bug #743397 I added some snity checks when removing a log file, to avoid gai segfaulting when removing an invalid/non-existing log file." committer: Tailor Script diff -r 166ed121e555 -r c72213437829 src/log.c --- a/src/log.c Mon May 26 04:26:24 2003 +0000 +++ b/src/log.c Mon May 26 04:28:11 2003 +0000 @@ -28,6 +28,19 @@ { struct gaim_conversation *cnv = gaim_find_conversation(a->name); + /* Added the following if statements for sanity check */ + if (!a) + { + gaim_notify_error (NULL, NULL, _("Error in specifying buddy conversation."), NULL); + return; + } + cnv = gaim_find_conversation(a->name); + if (!cnv) + { + gaim_notify_error (NULL, NULL, _("Unable to find conversation log"), NULL); + return; + } + log_conversations = g_list_remove(log_conversations, a); save_prefs();