Possible NULL de-reference on fullsceen check

Also quiet some other minor warnings
This commit is contained in:
2015-02-03 16:40:27 +11:00
parent 32125c40d3
commit faaaf7ee1f
4 changed files with 7 additions and 3 deletions

View File

@@ -420,8 +420,9 @@ static void PE_create_shape_tree(PEData *data, Object *shapeob)
memset(&data->shape_bvh, 0, sizeof(data->shape_bvh));
if (!shapeob || !shapeob->derivedFinal)
if (!dm) {
return;
}
DM_ensure_tessface(dm);
bvhtree_from_mesh_faces(&data->shape_bvh, dm, 0.0f, 4, 8);

View File

@@ -164,7 +164,7 @@ ScrArea *render_view_open(bContext *C, int mx, int my)
/* if the active screen is already in fullscreen mode, skip this and
* unset the area, so that the fullscreen area is just changed later */
if (sa->full) {
if (sa && sa->full) {
sa = NULL;
}
else {

View File

@@ -3104,6 +3104,9 @@ static void proj_paint_state_viewport_init(ProjPaintState *ps)
ps->clipend = params.clipend;
ps->is_ortho = params.is_ortho;
}
else {
BLI_assert(0);
}
/* same as #ED_view3d_ob_project_mat_get */
mul_m4_m4m4(vmat, viewmat, ps->ob->obmat);

View File

@@ -390,7 +390,7 @@ static void node_draw_frame_label(bNodeTree *ntree, bNode *node, const float asp
float width, ascender;
float x, y;
const int font_size = data->label_size / aspect;
const float margin = NODE_DY / 4;
const float margin = (float)(NODE_DY / 4);
nodeLabel(ntree, node, label, sizeof(label));