ide/debugger: Fixed crash on closing project being debugged
authorJerome St-Louis <jerome@ecere.com>
Wed, 9 Apr 2014 15:55:51 +0000 (11:55 -0400)
committerJerome St-Louis <jerome@ecere.com>
Wed, 9 Apr 2014 15:55:51 +0000 (11:55 -0400)
ide/src/debugger/Debugger.ec

index 9bbcb5f..f4c315d 100644 (file)
@@ -1621,12 +1621,15 @@ class Debugger
             else if(!strcmp(item.name, "fullname"))
             {
                // GDB 6.3 on OS X is giving "fullname" and "dir", all in absolute, but file name only in 'file'
-               String path = ide.workspace.GetPathWorkspaceRelativeOrAbsolute(item.value);
-               if(strcmp(frame.file, path))
-                  frame.file = path;
-               delete path;
-
-               frame.absoluteFile = item.value; // ide.workspace.GetAbsolutePathFromRelative(frame.file);
+               Workspace ws = ide.workspace;
+               if(ws)
+               {
+                  String path = ide.workspace.GetPathWorkspaceRelativeOrAbsolute(item.value);
+                  if(strcmp(frame.file, path))
+                     frame.file = path;
+                  delete path;
+               }
+               frame.absoluteFile = item.value;
             }
             else
                _dpl2(_dpct, dplchan::gdbProtoUnknown, 0, "frame member (", item.name, "=", item.value, ") is unheard of");