summaryrefslogtreecommitdiff
path: root/src/examples/rrdHeaderInfo.html
diff options
context:
space:
mode:
Diffstat (limited to 'src/examples/rrdHeaderInfo.html')
-rw-r--r--src/examples/rrdHeaderInfo.html4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/examples/rrdHeaderInfo.html b/src/examples/rrdHeaderInfo.html
index 3a772d7..c0feddb 100644
--- a/src/examples/rrdHeaderInfo.html
+++ b/src/examples/rrdHeaderInfo.html
@@ -102,6 +102,10 @@
// and performs the update of the Web page
function update_info_handler(bf) {
var rrd_data=undefined;
+ if (bf.getLength()<1) {
+ alert("File "+fname+" is empty (possibly loading failed)!");
+ return 1;
+ }
try {
var rrd_data=new RRDFile(bf);
} catch(err) {