diff -r 7888def49437 -r 14861f3ffe0c pidgin/gtkwebview.c --- a/pidgin/gtkwebview.c Tue Sep 25 15:06:32 2018 -0500 +++ b/pidgin/gtkwebview.c Tue Sep 25 15:19:56 2018 -0500 @@ -194,9 +194,21 @@ return; if (img != NULL) { + /* At the time of this comment, purple_image_get_path() + * always returns something, whether it's the actual + * path or a unique identifier, such as derived from a + * hash. That API will probably be reviewed after which + * this code can probably be simplified. + */ + gchar *uri = NULL; + path = purple_image_get_path(img); + if (path) { - gchar *uri = g_filename_to_uri(path, NULL, NULL); + uri = g_filename_to_uri(path, NULL, NULL); + } + + if (uri != NULL) { webkit_network_request_set_uri(request, uri); g_free(uri); } else {