Skip to content

Commit

Permalink
fixed weather crash again
Browse files Browse the repository at this point in the history
  • Loading branch information
rilian-la-te committed Apr 26, 2015
1 parent 56da17c commit 19c22dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions applets/weather/weather.vala
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ namespace Weather
{
var loc = settings.get_value(LOCATIONS);
current_location = settings.get_uint(CURRENT_LOC);
if (loc.n_children() < 1)
return;
locations = new GWeather.Location[(int)loc.n_children()];
foreach(var item in location_items)
dbusmenu.remove_item(item.id);
Expand All @@ -137,10 +139,7 @@ namespace Weather
});
dbusmenu.prepend_item(location_items[i]);
}
if (location_items.length > 0)
info.location = locations[current_location];
else
info.location = GWeather.Location.get_world();
info.location = locations[current_location];
info.abort();
info.update();
dbusmenu.layout_updated(layout_revision++,0);
Expand Down
2 changes: 1 addition & 1 deletion data/gschemas/org.valapanel.weather.gschema.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<schemalist>
<schema id="org.valapanel.weather" path="/org/valapanel/extras/weather/">
<key name="locations" type="av">
<default>[<(uint32 2, <('Omsk', 'UNOO', true, [(0.95934931799731404, 1.2793263417118435)], [(0.95993108859688125, 1.2810716709638379)])>)>]</default>
<default>[]</default>
</key>
<key name="current-location" type="u">
<default>0</default>
Expand Down

0 comments on commit 19c22dc

Please sign in to comment.