projects
/
platform
/
core
/
api
/
maps-service.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7de95d8
)
added to check if a variable is null
19/75919/1
author
chanywa
<cbible.kim@samsung.com>
Wed, 22 Jun 2016 06:38:56 +0000
(15:38 +0900)
committer
chanywa
<cbible.kim@samsung.com>
Wed, 22 Jun 2016 06:38:56 +0000
(15:38 +0900)
Change-Id: I48ac5e3b60b78c4b6bb3ab30a66c176d65210f56
src/maps_util.h
patch
|
blob
|
history
diff --git
a/src/maps_util.h
b/src/maps_util.h
index
6fea677
..
92634cc
100755
(executable)
--- a/
src/maps_util.h
+++ b/
src/maps_util.h
@@
-127,13
+127,15
@@
public:
void push_back(const T &value)
{
T *clone = new T(value);
- g_array_append_val(parray, clone);
- current_size++;
+ if (clone) {
+ g_array_append_val(parray, clone);
+ current_size++;
+ }
}
T &operator[](size_t idx) const
{
T *item = g_array_index(parray, T *, idx);
-
return *item;
+ return *item;
}
unsigned int size() const
{