forked from bartvdbraak/blender
fix crash when polling image sample outside image space.
also remove historic comment which isnt helpful.
This commit is contained in:
parent
8a1a4a453d
commit
7fd1bd18e5
@ -644,7 +644,7 @@ void MEM_printmemlist_pydict(void)
|
|||||||
MEM_printmemlist_internal(1);
|
MEM_printmemlist_internal(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
short MEM_freeN(void *vmemh) /* anders compileertie niet meer */
|
short MEM_freeN(void *vmemh)
|
||||||
{
|
{
|
||||||
short error = 0;
|
short error = 0;
|
||||||
MemTail *memt;
|
MemTail *memt;
|
||||||
|
@ -203,21 +203,27 @@ int space_image_main_area_not_uv_brush_poll(bContext *C)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int space_image_image_sample_poll(bContext *C)
|
static int image_sample_poll(bContext *C)
|
||||||
{
|
{
|
||||||
SpaceImage *sima = CTX_wm_space_image(C);
|
SpaceImage *sima = CTX_wm_space_image(C);
|
||||||
Object *obedit = CTX_data_edit_object(C);
|
if (sima) {
|
||||||
ToolSettings *toolsettings = CTX_data_scene(C)->toolsettings;
|
Scene *scene = CTX_data_scene(C);
|
||||||
|
Object *obedit = CTX_data_edit_object(C);
|
||||||
|
ToolSettings *toolsettings = scene->toolsettings;
|
||||||
|
|
||||||
if (obedit) {
|
if (obedit) {
|
||||||
if (ED_space_image_show_uvedit(sima, obedit) && (toolsettings->use_uv_sculpt))
|
if (ED_space_image_show_uvedit(sima, obedit) && (toolsettings->use_uv_sculpt))
|
||||||
return 0;
|
return FALSE;
|
||||||
}
|
}
|
||||||
else if (sima->mode != SI_MODE_VIEW) {
|
else if (sima->mode != SI_MODE_VIEW) {
|
||||||
return 0;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return space_image_main_area_poll(C);
|
return space_image_main_area_poll(C);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/********************** view pan operator *********************/
|
/********************** view pan operator *********************/
|
||||||
|
|
||||||
@ -2113,7 +2119,7 @@ void IMAGE_OT_sample(wmOperatorType *ot)
|
|||||||
ot->invoke = image_sample_invoke;
|
ot->invoke = image_sample_invoke;
|
||||||
ot->modal = image_sample_modal;
|
ot->modal = image_sample_modal;
|
||||||
ot->cancel = image_sample_cancel;
|
ot->cancel = image_sample_cancel;
|
||||||
ot->poll = space_image_image_sample_poll;
|
ot->poll = image_sample_poll;
|
||||||
|
|
||||||
/* flags */
|
/* flags */
|
||||||
ot->flag = OPTYPE_BLOCKING;
|
ot->flag = OPTYPE_BLOCKING;
|
||||||
|
Loading…
Reference in New Issue
Block a user