# HG changeset patch # User Mark Doliner # Date 1036741888 0 # Node ID 22e3bbbd9a32c2d4424922e8d98aab07f7417420 # Parent f0efc0293bbf0045758052bb85827b91d7390e4e [gaim-migrate @ 4102] So at some point gaim_user_dir() changed so that it returned a static buffer instead of some sort of fancy "dynamic" whizbang. So this just keeps the thing from segfaulting when you try to load it. Oh, and, uh, I don't actually use this. Honest I don't. I'm not really sure what it's supposed to do. It would be nice if it were gtk2ized, though. There is a big teddy bear on my desk. It's soft and fluffy. committer: Tailor Script diff -r f0efc0293bbf -r 22e3bbbd9a32 plugins/chatlist.c --- a/plugins/chatlist.c Fri Nov 08 07:42:16 2002 +0000 +++ b/plugins/chatlist.c Fri Nov 08 07:51:28 2002 +0000 @@ -99,16 +99,13 @@ g_snprintf(path, sizeof(path), "%s/%s", x, "chats"); f = fopen(path, "w"); - if (!f) { - g_free(x); + if (!f) return; - } while (crs) { struct chat_room *cr = crs->data; crs = crs->next; fprintf(f, "%s\n%d\n", cr->name, cr->exchange); } - g_free(x); fclose(f); } @@ -121,10 +118,8 @@ g_snprintf(path, sizeof(path), "%s/%s", x, "chats"); f = fopen(path, "r"); - if (!f) { - g_free(x); + if (!f) return; - } while (fgets(buf, 1024, f)) { struct chat_room *cr = g_new0(struct chat_room, 1); g_snprintf(cr->name, sizeof(cr->name), "%s", g_strchomp(buf));