(no commit message)
[prss.git] / src / ttrss_ws.c
index 4b9c040..0aed58d 100644 (file)
@@ -245,7 +245,6 @@ int ws_open_session()
                        session_id = NULL;
                        result = 0;
                }
-               result = 1;
        } else {
                result =  0;
        }
@@ -331,6 +330,12 @@ int ws_update_headlines(struct feed *feed)
                        j = json_object_object_get(jheadline, "unread");
                        h->unread = json_object_get_boolean(j);
                }
+
+               if (!feed->headlines) {
+                       feed->headlines = malloc(sizeof(struct headline *));
+                       *(feed->headlines) = NULL;
+               }
+
                json_object_put(rp);
                return 1;
        } else {