len = strcspn (url_text, "<>");
- if (url_try_text (task->task_pool, url_text, len, &off, &url_str)) {
+ if (url_try_text (task->task_pool, url_text, len, &off, &url_str) && url_str != NULL) {
new = memory_pool_alloc0 (task->task_pool, sizeof (struct uri));
if (new != NULL) {
g_strstrip (url_str);
}
while (p < end) {
if (url_try_text (pool, p, end - p, &off, &url_str)) {
- if (g_tree_lookup (is_html ? part->html_urls : part->urls, url_str) == NULL) {
+ if (url_str != NULL &&
+ g_tree_lookup (is_html ? part->html_urls : part->urls, url_str) == NULL) {
new = memory_pool_alloc0 (pool, sizeof (struct uri));
if (new != NULL) {
g_strstrip (url_str);
(*url_str)[m.m_len] = '\0';
}
+ else {
+ *url_str = NULL;
+ }
if (res) {
*res = strlen (matcher->pattern);
}
return ((gchar *)memcpy (buf, p, len)) + len;
}
-#if ((GLIB_MAJOR_VERSION == 2) && (GLIB_MICRO_VERSION == 2) && (GLIB_MINOR_VERSION < 22))
+#if ((GLIB_MAJOR_VERSION == 2) && (GLIB_MINOR_VERSION < 22))
void
g_ptr_array_unref (GPtrArray *array)
{
const gchar *symbol, struct statfile **st, gboolean try_create);
#endif
-#if ((GLIB_MAJOR_VERSION == 2) && (GLIB_MICRO_VERSION == 2) && (GLIB_MINOR_VERSION < 22))
+#if ((GLIB_MAJOR_VERSION == 2) && (GLIB_MINOR_VERSION < 22))
void g_ptr_array_unref (GPtrArray *array);
#endif
/*