Fix crash with x-ray and redo panel

Code was assuming any area with region data was the main one.
This is no longer the case.
This commit is contained in:
Dalai Felinto
2018-06-15 14:58:45 +02:00
parent 84c91a87a9
commit 86a2f4a34a

View File

@@ -296,8 +296,10 @@ void ED_view3d_shade_update(Main *bmain, View3D *v3d, ScrArea *sa)
ARegion *ar;
for (ar = sa->regionbase.first; ar; ar = ar->next) {
if (ar->regiondata)
if ((ar->regiontype == RGN_TYPE_WINDOW) && ar->regiondata) {
ED_view3d_stop_render_preview(wm, ar);
break;
}
}
}
}