diff options
author | Julian Andres Klode <jak@debian.org> | 2017-10-25 21:42:43 +0200 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2017-10-25 21:42:43 +0200 |
commit | e04bed5109af34a6f14179b3b45b4a8352548d1a (patch) | |
tree | f9cfdb5bf516bd33e1415dbda9a778b5bd1135c6 /apt-pkg/acquire-worker.cc | |
parent | cf1a98baa58360a56f38cc3d5ce01905f6ebc8f4 (diff) |
Don't segfault if receiving a method warning on empty queue
We would like to issue a warning about seccomp support in
Configuration(), but since the queue is empty, there is no
current item to show the URL for and we get a segfault. Show
the protocol instead.
Diffstat (limited to 'apt-pkg/acquire-worker.cc')
-rw-r--r-- | apt-pkg/acquire-worker.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/acquire-worker.cc b/apt-pkg/acquire-worker.cc index 49d67e370..39158aed7 100644 --- a/apt-pkg/acquire-worker.cc +++ b/apt-pkg/acquire-worker.cc @@ -327,7 +327,7 @@ bool pkgAcquire::Worker::RunMessages() } case MessageType::WARNING: - _error->Warning("%s: %s", Itm->Owner->DescURI().c_str(), LookupTag(Message,"Message").c_str()); + _error->Warning("%s: %s", Itm ? Itm->Owner ? Itm->Owner->DescURI().c_str() : Access.c_str() : Access.c_str(), LookupTag(Message, "Message").c_str()); break; case MessageType::URI_START: |