summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-08-04 07:31:29 +0000
committerrubidium <rubidium@openttd.org>2010-08-04 07:31:29 +0000
commit3fd1fc35e606d1ef6a56408c71fd3bf4acbd9b63 (patch)
treecae8aa39b3f43bdd1119a61a0bbc723b776e1a3d /src
parentba527ec56ef572637fa3464ad89c05162bbf6624 (diff)
downloadopenttd-3fd1fc35e606d1ef6a56408c71fd3bf4acbd9b63.tar.xz
(svn r20358) -Fix [FS#4008]: (r20281) crash when building some stuff when the measurement tooltip is disabled
Diffstat (limited to 'src')
-rw-r--r--src/viewport.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/viewport.cpp b/src/viewport.cpp
index 4eff0bd15..169e56f04 100644
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -2602,8 +2602,8 @@ calc_heightdiff_single_direction:;
}
ShowMeasurementTooltips(measure_strings_length[index], index, params);
- break;
}
+ break;
case VPM_X_AND_Y_LIMITED: // Drag an X by Y constrained rect area.
limit = (_thd.sizelimit - 1) * TILE_SIZE;
@@ -2611,7 +2611,7 @@ calc_heightdiff_single_direction:;
y = sy + Clamp(y - sy, -limit, limit);
/* FALL THROUGH */
- case VPM_X_AND_Y: { // drag an X by Y area
+ case VPM_X_AND_Y: // drag an X by Y area
if (_settings_client.gui.measure_tooltip) {
static const StringID measure_strings_area[] = {
STR_NULL, STR_NULL, STR_MEASURE_AREA, STR_MEASURE_AREA_HEIGHTDIFF
@@ -2645,9 +2645,8 @@ calc_heightdiff_single_direction:;
ShowMeasurementTooltips(measure_strings_area[index], index, params);
}
- break;
+ break;
- }
default: NOT_REACHED();
}