Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-09-15 11:42:30 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-09-15 11:42:30 +0400
commit5dbd603363c3f4f91b627b759c9992efc2a0ada8 (patch)
tree1a4aa6d16795648cb0d65b3686d21406006196c8 /source
parentfed6b2bcb75a0d67d1b1266fd13d9a4b89dd1923 (diff)
code cleanup: remove more invalid/paranoid NULL checks
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/interface/interface_regions.c11
-rw-r--r--source/blender/modifiers/intern/MOD_particlesystem.c8
2 files changed, 5 insertions, 14 deletions
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index 10a64d50887..59fa66b12af 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -1494,7 +1494,7 @@ static void ui_block_position(wmWindow *window, ARegion *butregion, uiBut *but,
BLI_rctf_translate(&block->rect, xof, yof);
/* safety calculus */
- if (but) {
+ {
const float midx = BLI_RCT_CENTER_X(&butrct);
const float midy = BLI_RCT_CENTER_Y(&butrct);
@@ -1521,20 +1521,13 @@ static void ui_block_position(wmWindow *window, ARegion *butregion, uiBut *but,
}
block->direction = dir1;
}
- else {
- block->safety.xmin = block->rect.xmin - 40;
- block->safety.ymin = block->rect.ymin - 40;
- block->safety.xmax = block->rect.xmax + 40;
- block->safety.ymax = block->rect.ymax + 40;
- }
/* keep a list of these, needed for pulldown menus */
saferct = MEM_callocN(sizeof(uiSafetyRct), "uiSafetyRct");
saferct->parent = butrct;
saferct->safety = block->safety;
BLI_freelistN(&block->saferct);
- if (but)
- BLI_duplicatelist(&block->saferct, &but->block->saferct);
+ BLI_duplicatelist(&block->saferct, &but->block->saferct);
BLI_addhead(&block->saferct, saferct);
}
diff --git a/source/blender/modifiers/intern/MOD_particlesystem.c b/source/blender/modifiers/intern/MOD_particlesystem.c
index 890e45f7e80..254c02b7672 100644
--- a/source/blender/modifiers/intern/MOD_particlesystem.c
+++ b/source/blender/modifiers/intern/MOD_particlesystem.c
@@ -188,11 +188,9 @@ static void deformVerts(ModifierData *md, Object *ob,
psmd->totdmface = psmd->dm->getNumTessFaces(psmd->dm);
}
- if (psys) {
- psmd->flag &= ~eParticleSystemFlag_psys_updated;
- particle_system_update(md->scene, ob, psys);
- psmd->flag |= eParticleSystemFlag_psys_updated;
- }
+ psmd->flag &= ~eParticleSystemFlag_psys_updated;
+ particle_system_update(md->scene, ob, psys);
+ psmd->flag |= eParticleSystemFlag_psys_updated;
}
/* disabled particles in editmode for now, until support for proper derivedmesh