comparison libpurple/imgstore.c @ 27666:a08e84032814

merge of '2348ff22f0ff3453774b8b25b36238465580c609' and 'e76f11543c2a4aa05bdf584f087cbe3439029661'
author Paul Aurich <paul@darkrain42.org>
date Sun, 12 Jul 2009 05:43:38 +0000
parents 1643ace55ef8
children f1437342cc0e
comparison
equal deleted inserted replaced
27186:048bcf41deef 27666:a08e84032814
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);