diff --git a/src/DownloadRow.vala b/src/DownloadRow.vala index 80a8432..f5a2ef1 100644 --- a/src/DownloadRow.vala +++ b/src/DownloadRow.vala @@ -121,8 +121,10 @@ namespace CopyPasteGrab { }); this.video_download.video_info.connect ((info) => { - File file = File.new_for_path (info.thumbnail); - thumbnail.set_from_file_async.begin (file, 100, 100, true); + if (info.thumbnail != null) { + File file = File.new_for_path (info.thumbnail); + thumbnail.set_from_file_async.begin (file, 100, 100, true); + } title_label.label = info.title; start_button.sensitive = true; }); diff --git a/src/VideoInfo.vala b/src/VideoInfo.vala index 5e09a05..86ee69a 100644 --- a/src/VideoInfo.vala +++ b/src/VideoInfo.vala @@ -24,7 +24,7 @@ namespace CopyPasteGrab { public class VideoInfo : Object { public string url { get; set; } public string title { get; set; } - public string thumbnail { get; set; } + public string? thumbnail { get; set; } public string json { get; set; } public VideoInfo () {