From e094fee0dc340abd8097ea0dd54d00155a0e1c5d Mon Sep 17 00:00:00 2001
From: alx <alx@fastestcode.org>
Date: Tue, 2 Apr 2013 22:44:14 +0200
Subject: [PATCH] Fixed dtpad server crash when closing editor window
 associated with primary document
Content-Length: 1010
Status: RO

---
 cde/programs/dtpad/main.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/cde/programs/dtpad/main.c b/cde/programs/dtpad/main.c
index 402e688..ff18cf7 100644
--- a/cde/programs/dtpad/main.c
+++ b/cde/programs/dtpad/main.c
@@ -633,6 +633,11 @@ CreateFirstPad(
 	initialServerResources = pPad->xrdb;
 	initialServerResources.server = False; /* so window will be mapped */ 
 	initialServerGeometry = pPad->geometry;
+	if(pPad->xrdb.workspaceList)
+		pPad->xrdb.workspaceList = strdup(pPad->xrdb.workspaceList);
+	if(pPad->xrdb.session)
+		pPad->xrdb.session = strdup(pPad->xrdb.session);
+	pPad->geometry = strdup(pPad->geometry);
     }
 
     /* Set some initial Editor instance values */
@@ -1677,7 +1682,6 @@ RestoreInitialServerResources(
 	XtFree(pPad->geometry );
 
     pPad->xrdb = initialServerResources;
-    pPad->geometry = initialServerGeometry;
 
     /* -----> duplicate resource strings */
     if (initialServerResources.workspaceList != (char *)NULL)
-- 
1.8.1.5


