summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-10-18 13:30:10 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-10-18 13:30:10 -0400
commit20b592cef7f231378f67e0f78d5670144b4d3693 (patch)
tree654a5f275f58ca0b68e5c960f22ad4e5225fc65a /src/lib
parentc12008b4d0118232aca3f45e3e77137acef75078 (diff)
fix various trivial null derefs
Summary: CIDs 1401081, 1401044, 1400983, 1400960, 1400927, 1400799, 1396946, 1396944, 1383851, 1383847, 1382211, 1379921, 1379921 Reviewers: cedric Reviewed By: cedric Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10452
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ecore/efl_loop_handler.c4
-rw-r--r--src/lib/ephysics/ephysics_body.cpp1
2 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/ecore/efl_loop_handler.c b/src/lib/ecore/efl_loop_handler.c
index 3bed513..4c1034e 100644
--- a/src/lib/ecore/efl_loop_handler.c
+++ b/src/lib/ecore/efl_loop_handler.c
@@ -113,7 +113,7 @@ _handler_reset(Eo *obj, Efl_Loop_Handler_Data *pd)
113 113
114 if (pd->handler_fd) 114 if (pd->handler_fd)
115 _handler_active_update(obj, pd); 115 _handler_active_update(obj, pd);
116 else 116 else if (pd->loop_data)
117 { 117 {
118 pd->handler_fd = _ecore_main_fd_handler_add 118 pd->handler_fd = _ecore_main_fd_handler_add
119 (pd->loop, pd->loop_data, obj, pd->fd, _handler_flags_get(pd), 119 (pd->loop, pd->loop_data, obj, pd->fd, _handler_flags_get(pd),
@@ -122,7 +122,7 @@ _handler_reset(Eo *obj, Efl_Loop_Handler_Data *pd)
122 if (pd->handler_fd) _handler_active_update(obj, pd); 122 if (pd->handler_fd) _handler_active_update(obj, pd);
123 } 123 }
124 } 124 }
125 else if (pd->win32) 125 else if (pd->win32 && pd->loop_data)
126 { 126 {
127 pd->handler_win32 = _ecore_main_win32_handler_add 127 pd->handler_win32 = _ecore_main_win32_handler_add
128 (pd->loop, pd->loop_data, obj, pd->win32, _cb_handler_win32, obj); 128 (pd->loop, pd->loop_data, obj, pd->win32, _cb_handler_win32, obj);
diff --git a/src/lib/ephysics/ephysics_body.cpp b/src/lib/ephysics/ephysics_body.cpp
index 20b5804..02c7e8d 100644
--- a/src/lib/ephysics/ephysics_body.cpp
+++ b/src/lib/ephysics/ephysics_body.cpp
@@ -274,6 +274,7 @@ _ephysics_body_soft_body_slice_new(EPhysics_Body *body, double delta, double max
274 faces = body->soft_body->m_faces; 274 faces = body->soft_body->m_faces;
275 275
276 slice->index = index; 276 slice->index = index;
277 if (!faces.size()) return slice;
277 slice->p[0].x = _ephysics_body_soft_body_slice_calc( 278 slice->p[0].x = _ephysics_body_soft_body_slice_calc(
278 faces[slice->index].m_n[0]->m_x.x(), delta, max); 279 faces[slice->index].m_n[0]->m_x.x(), delta, max);
279 slice->p[0].y = 1 - _ephysics_body_soft_body_slice_calc( 280 slice->p[0].y = 1 - _ephysics_body_soft_body_slice_calc(