mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-02 17:43:06 +02:00
Fixing crash seen on developer console.
Basically, if the screen space gets really constrained, we would get a negative dimension for an image.
This commit is contained in:
@@ -511,8 +511,8 @@ public class ChartView extends View {
|
||||
// Dimensions have changed (for example due to orientation change):
|
||||
w = c.getWidth();
|
||||
h = c.getHeight();
|
||||
effectiveWidth = w - leftBorder - RIGHT_BORDER;
|
||||
effectiveHeight = h - TOP_BORDER - BOTTOM_BORDER;
|
||||
effectiveWidth = Math.max(0, w - leftBorder - RIGHT_BORDER);
|
||||
effectiveHeight = Math.max(0, h - TOP_BORDER - BOTTOM_BORDER);
|
||||
setupPath();
|
||||
}
|
||||
c.save();
|
||||
|
||||
Reference in New Issue
Block a user