pidgin: e36b88f5: Don't try to read in '' as our account i...
darkrain42 at pidgin.im
darkrain42 at pidgin.im
Fri Jul 3 00:31:38 EDT 2009
-----------------------------------------------------------------
Revision: e36b88f5e5dd803dca347e74a0746f6a0e3d9bec
Ancestor: b0c790d3f728d16ba5b6ec946aa3550c1adc849d
Author: darkrain42 at pidgin.im
Date: 2009-07-03T04:21:16
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/e36b88f5e5dd803dca347e74a0746f6a0e3d9bec
Modified files:
libpurple/imgstore.c pidgin/gtkaccount.c
ChangeLog:
Don't try to read in '' as our account icon. I don't know if I have a messed up prefs.xml or something else changed recently.
-------------- next part --------------
============================================================
--- libpurple/imgstore.c 247dcd1cf34391facebd8f69fe9c3042969f37bf
+++ libpurple/imgstore.c 80e0dc5f54bc2a4243e4f81ee46c105ffd60bb62
@@ -75,6 +75,8 @@ purple_imgstore_new_from_file(const char
size_t len;
GError *err = NULL;
+ g_return_val_if_fail(path != NULL && *path != '\0', NULL);
+
if (!g_file_get_contents(path, &data, &len, &err)) {
purple_debug_error("imgstore", "Error reading %s: %s\n",
path, err->message);
============================================================
--- pidgin/gtkaccount.c f7bb182fa4fd2fb71894e9c2580c2ea1e64e84ae
+++ pidgin/gtkaccount.c 4317217f58f5f89e6d856249c7b974aa09b8792b
@@ -1990,7 +1990,7 @@ set_account(GtkListStore *store, GtkTree
/* This is for when set_account() is called for a single account */
const char *path;
path = purple_prefs_get_path(PIDGIN_PREFS_ROOT "/accounts/buddyicon");
- if (path != NULL)
+ if (path != NULL && *path != '\0')
img = purple_imgstore_new_from_file(path);
}
} else {
More information about the Commits
mailing list