[perf] Fix demo mode.

Protect against PubSubMsg being null when ingesting from local files.

Change-Id: I1d264166d2a284d22ec12069842b91a1f16f1855
Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/706540
Reviewed-by: Ashwin Verleker <ashwinpv@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Auto-Submit: Joe Gregorio <jcgregorio@google.com>
diff --git a/perf/go/ingest/process/process.go b/perf/go/ingest/process/process.go
index 26bd093..d37fd5a 100644
--- a/perf/go/ingest/process/process.go
+++ b/perf/go/ingest/process/process.go
@@ -199,10 +199,12 @@
 		sklog.Errorf("Failed to write after %d retries %q: %s", retries, f.Name, err)
 		nackMessageIfNecessary(w.dlEnabled, f)
 	} else {
-		f.PubSubMsg.Ack()
+		if f.PubSubMsg != nil {
+			f.PubSubMsg.Ack()
+			sklog.Debugf("Message acked: %v", f.PubSubMsg)
+		}
 		w.successfulWrite.Inc(1)
 		w.successfulWriteCount.Inc(int64(len(params)))
-		sklog.Debugf("Message acked: %v", f.PubSubMsg)
 	}
 
 	if err := sendPubSubEvent(ctx, w.pubSubClient, w.instanceConfig.IngestionConfig.FileIngestionTopicName, params, ps.Freeze(), f.Name); err != nil {