diff options
author | Martin Poirier <theeth@yahoo.com> | 2010-01-08 06:55:06 +0300 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2010-01-08 06:55:06 +0300 |
commit | 59a8c295c686c2c2c588ee8cc345c47c28a8e400 (patch) | |
tree | 390d80509a4b36e9a6d91c5f184f00acab220474 /source/blender/editors | |
parent | b517ceb374268df0baa500b4b1ce65721d0d50f1 (diff) |
Make the image open operator work even if there's no scene in context.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_image/image_ops.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 897b02404ef..f204d7702f0 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -649,7 +649,8 @@ static int open_exec(bContext *C, wmOperator *op) char str[FILE_MAX]; RNA_string_get(op->ptr, "path", str); - ima= BKE_add_image_file(str, scene->r.cfra); + /* default to frame 1 if there's no scene in context */ + ima= BKE_add_image_file(str, scene ? scene->r.cfra : 1); if(!ima) { if(op->customdata) MEM_freeN(op->customdata); |