summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/commands.h1
-rw-r--r--src/gui/tradewindow.cpp3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/commands.h b/src/commands.h
index f41a16339..4b0e2a0f8 100644
--- a/src/commands.h
+++ b/src/commands.h
@@ -298,6 +298,7 @@ static const CommandInfo commands[] =
{"", &Commands::dontRemoveName, -1, false},
{"", &Commands::removeName, -1, false},
{"disableaway", &Commands::disableAway, -1, false},
+ {"enableaway", &Commands::enableAway, -1, false},
{"drop", nullptr, Input::KEY_QUICK_DROP, false},
{"dropn", nullptr, Input::KEY_QUICK_DROPN, false},
{"movetotarget", nullptr, Input::KEY_MOVE_TO_TARGET, false},
diff --git a/src/gui/tradewindow.cpp b/src/gui/tradewindow.cpp
index 2e5d026b2..3c1ce60bb 100644
--- a/src/gui/tradewindow.cpp
+++ b/src/gui/tradewindow.cpp
@@ -223,7 +223,8 @@ void TradeWindow::increaseQuantity(const int index, const bool own,
item = mMyInventory->getItem(index);
else
item = mPartnerInventory->getItem(index);
- item->increaseQuantity(quantity);
+ if (item)
+ item->increaseQuantity(quantity);
}
void TradeWindow::reset()