diff options
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/game.cpp b/src/game.cpp index f4241d0d..3dd254ef 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -1606,8 +1606,10 @@ void do_parse() sellDialog->reset(); sellDialog->setVisible(true); for (int k = 0; k < n_items; k++) { - sellDialog->addItem( - RFIFOW(4 + 10 * k), RFIFOL(4 + 10 * k + 2)); + Item *item = inventory->getItem(RFIFOW(4 + 10 * k)); + if (item) { + sellDialog->addItem(item, RFIFOL(4 + 10 * k + 2)); + } } } else { |