Fixed dtpad server crash when closing editor window associated with primary document
authoralx <alx@fastestcode.org>
Tue, 2 Apr 2013 20:44:14 +0000 (22:44 +0200)
committerJon Trulson <jon@radscan.com>
Mon, 15 Apr 2013 23:54:25 +0000 (17:54 -0600)
cde/programs/dtpad/main.c

index 402e688e531c7016ab19e09bc567a0aedf6446aa..ff18cf716e4183bef9c75d79f85e12c45158424c 100644 (file)
@@ -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)