diff --git a/applyPatches.sh b/applyPatches.sh
index 70c860b4b9..8ef677fbd2 100755
--- a/applyPatches.sh
+++ b/applyPatches.sh
@@ -21,6 +21,7 @@ function applyPatch {
     git fetch upstream >/dev/null 2>&1
     git reset --hard upstream/upstream
     echo "  Applying patches to $target..."
+    git am --abort
     git am --3way $basedir/${what}-Patches/*.patch
     if [ "$?" != "0" ]; then
         echo "  Something did not apply cleanly to $target."