From 89c7b2e139ebf6a4eb8403a24a8ae55a5e0b9fef Mon Sep 17 00:00:00 2001 From: AlexPeshkoff Date: Wed, 29 Mar 2023 13:47:17 +0300 Subject: [PATCH] Suggested fix for #7514: Segfault when detaching after deleting shadow on Classic --- src/jrd/sdw.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/jrd/sdw.cpp b/src/jrd/sdw.cpp index 8730a5d2ea..016df82320 100644 --- a/src/jrd/sdw.cpp +++ b/src/jrd/sdw.cpp @@ -581,7 +581,11 @@ void SDW_get_shadows(thread_db* tdbb) // to prevent missing any new ones later on, although it does not // matter for the purposes of the current page being written - MET_get_shadow_files(tdbb, false); + // no use even trying to get shadow files in a case when we invoked from + // JRD_shutdown_database, i.e. there are no attachments to database + + if (tdbb->getAttachment()) + MET_get_shadow_files(tdbb, false); }