Fix #30020: Movie Clip Editor Crashed with panel size changed

This commit is contained in:
2012-01-30 09:05:26 +00:00
parent a4603667b8
commit e86c5f858c

View File

@@ -1529,6 +1529,7 @@ void ui_draw_but_TRACKPREVIEW(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wc
width= rect.xmax-rect.xmin+1;
height = rect.ymax-rect.ymin;
if(width > 0 && height > 0) {
zoomx= (float)width / (scopes->track_preview->x-2*margin);
zoomy= (float)height / (scopes->track_preview->y-2*margin);
@@ -1562,6 +1563,7 @@ void ui_draw_but_TRACKPREVIEW(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wc
glVertex2f(0.0f, 10.0f);
glEnd();
}
}
glDisable(GL_LINE_STIPPLE);
glPopMatrix();