projects
/
zefram
/
minetest
/
minetest_engine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4e10555
)
Fix possible NULL dereference in MobV2CAO::step
author
Perttu Ahola
<celeron55@gmail.com>
Tue, 18 Oct 2011 16:53:34 +0000
(19:53 +0300)
committer
Perttu Ahola
<celeron55@gmail.com>
Tue, 18 Oct 2011 16:53:34 +0000
(19:53 +0300)
src/content_cao.cpp
patch
|
blob
|
history
diff --git
a/src/content_cao.cpp
b/src/content_cao.cpp
index 67594eb9f9afdd48493eb70ebeadb76447215165..6cb2cee385f53b2112656f826c3ea5d0963af91a 100644
(file)
--- a/
src/content_cao.cpp
+++ b/
src/content_cao.cpp
@@
-1000,6
+1000,8
@@
void MobV2CAO::step(float dtime, ClientEnvironment *env)
if(m_sprite_type == "humanoid_1"){
scene::ICameraSceneNode* camera = m_node->getSceneManager()->getActiveCamera();
+ if(!camera)
+ return;
v3f cam_to_mob = m_node->getAbsolutePosition() - camera->getAbsolutePosition();
cam_to_mob.normalize();
int col = 0;