mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-25 19:55:48 +01:00
Prevent Marketplace NPE on last page without topics (#2518)
Fixes #2505 Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
parent
875ca0602e
commit
fa92c20bb1
@ -177,7 +177,9 @@ public class CommunityMarketplaceAddonService implements AddonService {
|
||||
|
||||
try (Reader reader = new InputStreamReader(connection.getInputStream())) {
|
||||
DiscourseCategoryResponseDTO parsed = gson.fromJson(reader, DiscourseCategoryResponseDTO.class);
|
||||
pages.add(parsed);
|
||||
if (parsed.topic_list.topics.length != 0) {
|
||||
pages.add(parsed);
|
||||
}
|
||||
|
||||
if (parsed.topic_list.more_topics_url != null) {
|
||||
// Discourse URL for next page is wrong
|
||||
|
Loading…
Reference in New Issue
Block a user