forked from bartvdbraak/blender
Fix #19383: crash pressing image open in texture buttons.
This commit is contained in:
parent
26836bf44f
commit
c67db42e3e
@ -643,7 +643,7 @@ static int open_exec(bContext *C, wmOperator *op)
|
||||
static int open_invoke(bContext *C, wmOperator *op, wmEvent *event)
|
||||
{
|
||||
SpaceImage *sima= CTX_wm_space_image(C);
|
||||
char *path= (sima->image)? sima->image->name: U.textudir;
|
||||
char *path= (sima && sima->image)? sima->image->name: U.textudir;
|
||||
|
||||
if(RNA_property_is_set(op->ptr, "path"))
|
||||
return open_exec(C, op);
|
||||
|
Loading…
Reference in New Issue
Block a user