Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Poirier <theeth@yahoo.com>2010-01-08 06:55:06 +0300
committerMartin Poirier <theeth@yahoo.com>2010-01-08 06:55:06 +0300
commit59a8c295c686c2c2c588ee8cc345c47c28a8e400 (patch)
tree390d80509a4b36e9a6d91c5f184f00acab220474 /source/blender/editors
parentb517ceb374268df0baa500b4b1ce65721d0d50f1 (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.c3
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);