[shotwell] google-photos: Prevent critical on empty response
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shotwell] google-photos: Prevent critical on empty response
- Date: Wed, 30 Jan 2019 16:38:55 +0000 (UTC)
commit 49c01348dab8b6884590f5be2ed4a6ff4c04d67b
Author: Jens Georg <mail jensge org>
Date: Wed Jan 30 17:38:18 2019 +0100
google-photos: Prevent critical on empty response
plugins/shotwell-publishing/PhotosPublisher.vala | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/plugins/shotwell-publishing/PhotosPublisher.vala
b/plugins/shotwell-publishing/PhotosPublisher.vala
index ca9a2ec1..d878158d 100644
--- a/plugins/shotwell-publishing/PhotosPublisher.vala
+++ b/plugins/shotwell-publishing/PhotosPublisher.vala
@@ -195,6 +195,10 @@ private class AlbumDirectoryTransaction : Publishing.RESTSupport.GooglePublisher
debug(this.get_response());
var json = Json.from_string (this.get_response());
var object = json.get_object ();
+ if (!object.has_member ("albums")) {
+ return;
+ }
+
var pagination_token_node = object.get_member ("nextPageToken");
var response_albums = object.get_member ("albums").get_array();
response_albums.foreach_element( (a, b, element) => {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]