summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/cachefilter-patterns.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/cachefilter-patterns.cc b/apt-pkg/cachefilter-patterns.cc
index 5a58a9767..bc0eece30 100644
--- a/apt-pkg/cachefilter-patterns.cc
+++ b/apt-pkg/cachefilter-patterns.cc
@@ -501,7 +501,7 @@ BaseRegexMatcher::BaseRegexMatcher(std::string const &Pattern)
}
bool BaseRegexMatcher::operator()(const char *string)
{
- if (unlikely(pattern == NULL))
+ if (unlikely(pattern == nullptr) || string == nullptr)
return false;
else
return regexec(pattern, string, 0, 0, 0) == 0;