fix own mistake getting an image for the image open file selector.
authorCampbell Barton <ideasman42@gmail.com>
Mon, 30 Jul 2012 17:02:28 +0000 (17:02 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 30 Jul 2012 17:02:28 +0000 (17:02 +0000)
source/blender/editors/space_image/image_ops.c

index d34f734c6c2b5dc2c009bc5d8e30b676a4722c20..8376a0bf0d34ce00ea67817832881fdc080a8b4a 100644 (file)
@@ -919,7 +919,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;
                        }
                }