summaryrefslogtreecommitdiffstats
path: root/webkit/glue/glue_serialize.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/glue/glue_serialize.cc')
-rw-r--r--webkit/glue/glue_serialize.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/webkit/glue/glue_serialize.cc b/webkit/glue/glue_serialize.cc
index df055fe..54ba743 100644
--- a/webkit/glue/glue_serialize.cc
+++ b/webkit/glue/glue_serialize.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -112,10 +112,10 @@ inline void WriteReal(double data, SerializeObject* obj) {
}
inline double ReadReal(const SerializeObject* obj) {
- const void* tmp;
+ const void* tmp = NULL;
int length = 0;
ReadData(obj, &tmp, &length);
- if (length > 0 && length >= static_cast<int>(sizeof(0.0)))
+ if (tmp && length > 0 && length >= static_cast<int>(sizeof(0.0)))
return *static_cast<const double*>(tmp);
else
return 0.0;