Skip to content

Commit

Permalink
More null checks
Browse files Browse the repository at this point in the history
  • Loading branch information
tkashkin committed Jan 5, 2020
1 parent 6057e0f commit 66d4631
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ui/views/GameDetailsView/blocks/GOGDetails.vala
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ namespace GameHub.UI.Views.GameDetailsView.Blocks
add(link);
add(new Separator(Orientation.HORIZONTAL));

var sys_langs = Intl.get_language_names();
var langs = root.get_object().get_object_member("languages");
var langs = Parser.json_object(root, {"languages"});
if(langs != null)
{
var sys_langs = Intl.get_language_names();
var langs_string = "";
foreach(var l in langs.get_members())
{
Expand Down Expand Up @@ -204,7 +204,7 @@ namespace GameHub.UI.Views.GameDetailsView.Blocks
{
Allocation alloc;
content.get_allocation(out alloc);
if(s.download != null)
if(s.download != null && s.download.status != null)
{
progress_bar.get_style_context().add_class("downloading");
progress_bar.set_size_request((int) (s.download.status.progress * alloc.width), alloc.height);
Expand Down

0 comments on commit 66d4631

Please sign in to comment.