Merged changes in the trunk up to revision 51853.
[blender-staging.git] / source / blender / makesrna / intern / rna_main.c
index 78e0fde5715a958f499df8ed7efd7c02a44add42..7783a64bf9ffdef22c20e271a12a164bbc5fae0f 100644 (file)
@@ -51,7 +51,7 @@ static int rna_Main_is_dirty_get(PointerRNA *ptr)
        /* XXX, not totally nice to do it this way, should store in main ? */
        Main *bmain = (Main *)ptr->data;
        wmWindowManager *wm;
-       for (wm = bmain->wm.first; wm; wm = wm->id.next) {
+       if ((wm = bmain->wm.first)) {
                return !wm->file_saved;
        }