-
- flags = tny_header_get_flags (header);
- /* TODO: is this the right flag?, it seems that some
- headers that have been previously downloaded do not
- come with it */
- result = (flags & TNY_HEADER_FLAG_CACHED);
+ if (header) {
+ flags = tny_header_get_flags (header);
+ /* TODO: is this the right flag?, it seems that some
+ headers that have been previously downloaded do not
+ come with it */
+ result = (flags & TNY_HEADER_FLAG_CACHED);
+
+ g_object_unref (header);
+ }