More fixes from coverity report.
This commit is contained in:
parent
64a6a86d57
commit
1e4e140efb
|
@ -1513,7 +1513,7 @@ static bool animsys_store_rna_setting(
|
|||
if (array_len && array_index >= array_len) {
|
||||
if (G.debug & G_DEBUG) {
|
||||
printf("Animato: Invalid array index. ID = '%s', '%s[%d]', array length is %d\n",
|
||||
(ptr && ptr->id.data) ? (((ID *)ptr->id.data)->name + 2) : "<No ID>",
|
||||
(ptr->id.data) ? (((ID *)ptr->id.data)->name + 2) : "<No ID>",
|
||||
path, array_index, array_len - 1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3051,9 +3051,15 @@ float smoke_get_velocity_at(struct Object *ob, float position[3], float velocity
|
|||
int smoke_get_data_flags(SmokeDomainSettings *sds)
|
||||
{
|
||||
int flags = 0;
|
||||
if (smoke_has_heat(sds->fluid)) flags |= SM_ACTIVE_HEAT;
|
||||
if (smoke_has_fuel(sds->fluid)) flags |= SM_ACTIVE_FIRE;
|
||||
if (smoke_has_colors(sds->fluid)) flags |= SM_ACTIVE_COLORS;
|
||||
|
||||
if (sds->fluid) {
|
||||
if (smoke_has_heat(sds->fluid))
|
||||
flags |= SM_ACTIVE_HEAT;
|
||||
if (smoke_has_fuel(sds->fluid))
|
||||
flags |= SM_ACTIVE_FIRE;
|
||||
if (smoke_has_colors(sds->fluid))
|
||||
flags |= SM_ACTIVE_COLORS;
|
||||
}
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
|
|
@ -1393,7 +1393,7 @@ int BKE_ffmpeg_property_add_string(RenderData *rd, const char *type, const char
|
|||
|
||||
avcodec_get_context_defaults3(&c, NULL);
|
||||
|
||||
strncpy(name_, str, sizeof(name_));
|
||||
BLI_strncpy(name_, str, sizeof(name_));
|
||||
|
||||
name = name_;
|
||||
while (*name == ' ') name++;
|
||||
|
|
|
@ -3901,7 +3901,12 @@ static void achannel_setting_flush_widget_cb(bContext *C, void *ale_npoin, void
|
|||
|
||||
/* send notifiers before doing anything else... */
|
||||
WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
|
||||
|
||||
|
||||
/* verify that we have a channel to operate on. */
|
||||
if (!ale_setting) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (ale_setting->type == ANIMTYPE_GPLAYER)
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA, NULL);
|
||||
|
||||
|
@ -3909,17 +3914,13 @@ static void achannel_setting_flush_widget_cb(bContext *C, void *ale_npoin, void
|
|||
if (ANIM_animdata_get_context(C, &ac) == 0)
|
||||
return;
|
||||
|
||||
/* verify that we have a channel to operate on, and that it has all we need */
|
||||
if (ale_setting) {
|
||||
/* check if the setting is on... */
|
||||
on = ANIM_channel_setting_get(&ac, ale_setting, setting);
|
||||
|
||||
/* on == -1 means setting not found... */
|
||||
if (on == -1)
|
||||
return;
|
||||
}
|
||||
else
|
||||
/* check if the setting is on... */
|
||||
on = ANIM_channel_setting_get(&ac, ale_setting, setting);
|
||||
|
||||
/* on == -1 means setting not found... */
|
||||
if (on == -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* get all channels that can possibly be chosen - but ignore hierarchy */
|
||||
filter = ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_CHANNELS;
|
||||
|
|
|
@ -278,8 +278,8 @@ static void rna_Scene_collada_export(
|
|||
int use_object_instantiation,
|
||||
int use_blender_profile,
|
||||
int sort_by_name,
|
||||
int export_transformation_type,
|
||||
int open_sim)
|
||||
int open_sim,
|
||||
int export_transformation_type)
|
||||
{
|
||||
collada_export(scene, filepath, apply_modifiers, export_mesh_type, selected,
|
||||
include_children, include_armatures, include_shapekeys, deform_bones_only,
|
||||
|
|
|
@ -306,7 +306,12 @@ bool KX_NavMeshObject::BuildNavMesh()
|
|||
|| vertsPerPoly<3)
|
||||
{
|
||||
printf("Can't build navigation mesh data for object:%s\n", m_name.ReadPtr());
|
||||
if (vertices) delete[] vertices;
|
||||
if (vertices) {
|
||||
delete[] vertices;
|
||||
}
|
||||
if (dvertices) {
|
||||
delete[] dvertices;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue