Index: trunk/ppStack/src/ppStackSources.c
===================================================================
--- trunk/ppStack/src/ppStackSources.c	(revision 27158)
+++ trunk/ppStack/src/ppStackSources.c	(revision 27159)
@@ -188,4 +188,22 @@
     options->sumExposure = sumExpTime;
 
+    if (numGoodImages == 0) {
+        psLogMsg("ppStack", PS_LOG_WARN, "No images with sources to measure transparency.");
+        options->quality = PPSTACK_ERR_REJECTED;
+        return true;
+    }
+    if (numGoodImages == 1) {
+        psArray *sources = NULL;        // Sources
+        for (int i = 0; i < num && !sources; i++) {
+            if (options->inputMask->data.PS_TYPE_VECTOR_MASK_DATA[i]) {
+                continue;
+            }
+            sources = sourceLists->data[i];
+        }
+        options->sources = psMemIncrRefCounter(sources);
+        psLogMsg("ppStack", PS_LOG_WARN, "Single image with sources --- no need to match transparency.");
+        return true;
+    }
+
     psArray *matches = pmSourceMatchSources(sourceLists, radius, true); // List of matches
     if (!matches) {
