diff --git a/plugins/tweak/tweaks/farm-plot-select.h b/plugins/tweak/tweaks/farm-plot-select.h index 063180c75..11d772450 100644 --- a/plugins/tweak/tweaks/farm-plot-select.h +++ b/plugins/tweak/tweaks/farm-plot-select.h @@ -53,9 +53,9 @@ struct farm_select_hook : df::viewscreen_dwarfmodest { DEFINE_VMETHOD_INTERPOSE(void, feed, (set *input)) { df::building_farmplotst* farm_plot = getFarmPlot(); - if (farm_plot) + if (farm_plot && ui->selected_farm_crops.size() > 0) { - if (input->count(interface_key::SELECT_ALL) && ui->selected_farm_crops.size() > 0) + if (input->count(interface_key::SELECT_ALL)) { int32_t crop_id = getSelectedCropId(); for (int season = 0; season < 4; season++) @@ -80,7 +80,7 @@ struct farm_select_hook : df::viewscreen_dwarfmodest { DEFINE_VMETHOD_INTERPOSE(void, render, ()) { INTERPOSE_NEXT(render)(); - if (!getFarmPlot()) + if (!getFarmPlot() || !ui->selected_farm_crops.size()) return; auto dims = Gui::getDwarfmodeViewDims(); int x = dims.menu_x1 + 1,