comparison libpurple/imgstore.c @ 27259:1643ace55ef8

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.
author Paul Aurich <paul@darkrain42.org>
date Fri, 03 Jul 2009 04:21:16 +0000
parents 2f4b10ee752b
children f1437342cc0e
comparison
equal deleted inserted replaced
27258:fc920924cea3 27259:1643ace55ef8
72 purple_imgstore_new_from_file(const char *path) 72 purple_imgstore_new_from_file(const char *path)
73 { 73 {
74 gchar *data = NULL; 74 gchar *data = NULL;
75 size_t len; 75 size_t len;
76 GError *err = NULL; 76 GError *err = NULL;
77
78 g_return_val_if_fail(path != NULL && *path != '\0', NULL);
77 79
78 if (!g_file_get_contents(path, &data, &len, &err)) { 80 if (!g_file_get_contents(path, &data, &len, &err)) {
79 purple_debug_error("imgstore", "Error reading %s: %s\n", 81 purple_debug_error("imgstore", "Error reading %s: %s\n",
80 path, err->message); 82 path, err->message);
81 g_error_free(err); 83 g_error_free(err);