summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/genworld_gui.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp
index f26d43ac3..14abd4b75 100644
--- a/src/genworld_gui.cpp
+++ b/src/genworld_gui.cpp
@@ -1313,6 +1313,12 @@ static void _SetGeneratingWorldProgress(GenWorldProgress cls, uint progress, uin
static_assert(lengthof(percent_table) == GWP_CLASS_COUNT + 1);
assert(cls < GWP_CLASS_COUNT);
+ /* Check if we really are generating the world.
+ * For example, placing trees via the SE also calls this function, but
+ * shouldn't try to update the progress.
+ */
+ if (!HasModalProgress()) return;
+
if (IsGeneratingWorldAborted()) {
HandleGeneratingWorldAbortion();
return;