Fix #30020: Movie Clip Editor Crashed with panel size changed
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user