summaryrefslogtreecommitdiff
path: root/Build/source/libs/poppler/poppler-src/goo/GooHash.cc
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/poppler/poppler-src/goo/GooHash.cc')
-rw-r--r--Build/source/libs/poppler/poppler-src/goo/GooHash.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/Build/source/libs/poppler/poppler-src/goo/GooHash.cc b/Build/source/libs/poppler/poppler-src/goo/GooHash.cc
index f4a92f17506..49f58c5f00a 100644
--- a/Build/source/libs/poppler/poppler-src/goo/GooHash.cc
+++ b/Build/source/libs/poppler/poppler-src/goo/GooHash.cc
@@ -6,6 +6,20 @@
//
//========================================================================
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2017 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
#include <config.h>
#ifdef USE_GCC_PRAGMAS
@@ -15,6 +29,7 @@
#include "gmem.h"
#include "GooString.h"
#include "GooHash.h"
+#include "GooLikely.h"
//------------------------------------------------------------------------
@@ -339,6 +354,9 @@ void GooHash::expand() {
GooHashBucket *GooHash::find(GooString *key, int *h) {
GooHashBucket *p;
+ if (unlikely(!key))
+ return nullptr;
+
*h = hash(key);
for (p = tab[*h]; p; p = p->next) {
if (!p->key->cmp(key)) {