summaryrefslogtreecommitdiff
path: root/midori/midori-download.vala
diff options
context:
space:
mode:
authorChristian Dywan <christian@twotoasts.de>2013-04-17 00:14:38 +0200
committerChristian Dywan <christian@twotoasts.de>2013-04-17 00:14:38 +0200
commite5d41a379f1549d1f6f44ebc019513297d69505f (patch)
tree29a79e76bdc2f98373a5969f50befbccd1dd61e0 /midori/midori-download.vala
parent5aefa04c684328bd622d1c28f06ee1994f4f8c1a (diff)
downloadmidori-e5d41a379f1549d1f6f44ebc019513297d69505f.tar.gz
Ensure that download last-size is stored as a pointer
Fixes: https://bugs.launchpad.net/midori/+bug/1053386
Diffstat (limited to 'midori/midori-download.vala')
-rw-r--r--midori/midori-download.vala4
1 files changed, 2 insertions, 2 deletions
diff --git a/midori/midori-download.vala b/midori/midori-download.vala
index 951332b5..bbf485e7 100644
--- a/midori/midori-download.vala
+++ b/midori/midori-download.vala
@@ -97,7 +97,7 @@ namespace Midori {
}
string speed = "";
- uint64 last_size = download.get_data<uint64> ("last-size");
+ uint64? last_size = download.get_data<uint64?> ("last-size");
if (elapsed != last_time) {
speed = format_size ((uint64)(
(current_size - last_size) / (elapsed - last_time)));
@@ -110,7 +110,7 @@ namespace Midori {
if (elapsed - last_time > 5.0) {
download.set_data<int> ("last-time", (int)elapsed);
- download.set_data<uint64> ("last-size", current_size);
+ download.set_data<uint64?> ("last-size", current_size);
}
return "%s\n%s %s%s".printf (filename, size, speed, eta);