Merging r49400 through r49404 from trunk into soc-2011-tomato
[blender.git] / source / blender / editors / space_image / image_ops.c
index 5fd17946bf5bacfd717ff7e70ff9e8c1bc5b2c49..02469184fef181aa20d8df32a65e27b35d720b3e 100644 (file)
@@ -920,7 +920,7 @@ static int image_open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)
                        oldptr = RNA_property_pointer_get(&ptr, prop);
                        oldima = (Image *)oldptr.id.data;
                        /* unlikely to fail but better avoid strange crash */
-                       if (oldima && GS(oldima->id.name) != ID_IM) {
+                       if (oldima && GS(oldima->id.name) == ID_IM) {
                                ima = oldima;
                        }
                }