From bcc245651becca2ce226589e76a7c7f0177e40a5 Mon Sep 17 00:00:00 2001 From: Simon Johnsson Date: Mon, 6 Oct 2025 23:15:50 +0200 Subject: Fix history command error when no ID was given --- apt-private/private-history.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'apt-private') diff --git a/apt-private/private-history.cc b/apt-private/private-history.cc index cf4540772..31b3b1333 100644 --- a/apt-private/private-history.cc +++ b/apt-private/private-history.cc @@ -352,6 +352,8 @@ class TransactionController static bool ParseId(const char *str, size_t &id, size_t max) { + if (str == nullptr) + return _error->Error(_("Incorrect usage, no ID was given.")); try { id = std::stoi(str); -- cgit v1.2.3-70-g09d2