From 5e2874a0fa9f043855a8c9e9bd1c02879b1f4c85 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Wed, 30 May 2018 22:51:13 -0400 Subject: [PATCH] Fixed a crash condition on saving a backup file if a cellDef's cd_file entry is NULL, relying on cd_name instead. --- database/DBio.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/database/DBio.c b/database/DBio.c index e04f6a9a..8a4f2be9 100644 --- a/database/DBio.c +++ b/database/DBio.c @@ -2363,7 +2363,10 @@ DBCellWriteFile(cellDef, f) * plane being searched. */ - arg.wa_name = cellDef->cd_file; + if (cellDef->cd_file) + arg.wa_name = cellDef->cd_file; + else + arg.wa_name = cellDef->cd_name; arg.wa_file = f; arg.wa_reducer = reducer; for (type = TT_PAINTBASE; type < DBNumUserLayers; type++)