mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-08 14:17:06 +03:00
0026347: Crash on the application close
Changing procedure to end execution of Tcl according to the documentation to prevent crashes
This commit is contained in:
@@ -199,7 +199,7 @@ static Standard_Integer CommandCmd
|
|||||||
|
|
||||||
if (cc && Draw::Atoi(cc)) {
|
if (cc && Draw::Atoi(cc)) {
|
||||||
#ifdef WNT
|
#ifdef WNT
|
||||||
Tcl_Exit(0);
|
Tcl_Finalize();
|
||||||
#else
|
#else
|
||||||
Tcl_Eval(interp,"exit");
|
Tcl_Eval(interp,"exit");
|
||||||
#endif
|
#endif
|
||||||
@@ -558,7 +558,7 @@ Draw_Interpretor::~Draw_Interpretor()
|
|||||||
#if ((TCL_MAJOR_VERSION > 8) || ((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)))
|
#if ((TCL_MAJOR_VERSION > 8) || ((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)))
|
||||||
try {
|
try {
|
||||||
OCC_CATCH_SIGNALS
|
OCC_CATCH_SIGNALS
|
||||||
Tcl_Exit(0);
|
Tcl_Finalize();
|
||||||
}
|
}
|
||||||
catch (Standard_Failure) {
|
catch (Standard_Failure) {
|
||||||
#ifdef OCCT_DEBUG
|
#ifdef OCCT_DEBUG
|
||||||
@@ -567,7 +567,7 @@ Draw_Interpretor::~Draw_Interpretor()
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#ifdef WNT
|
#ifdef WNT
|
||||||
Tcl_Exit(0);
|
Tcl_Finalize();
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@@ -1206,7 +1206,7 @@ static void StdinProc(ClientData clientData, int )
|
|||||||
if (count < 0) {
|
if (count < 0) {
|
||||||
if (!gotPartial) {
|
if (!gotPartial) {
|
||||||
if (tty) {
|
if (tty) {
|
||||||
Tcl_Exit(0);
|
Tcl_Finalize();
|
||||||
} else {
|
} else {
|
||||||
Tcl_DeleteChannelHandler(chan, StdinProc, (ClientData) chan);
|
Tcl_DeleteChannelHandler(chan, StdinProc, (ClientData) chan);
|
||||||
}
|
}
|
||||||
@@ -2103,7 +2103,7 @@ static DWORD WINAPI tkLoop(VOID)
|
|||||||
fprintf (stderr, "%s\n", interp->result);
|
fprintf (stderr, "%s\n", interp->result);
|
||||||
#endif
|
#endif
|
||||||
cout << "tkLoop: Tk_MainWindow() returned NULL. Exiting...\n";
|
cout << "tkLoop: Tk_MainWindow() returned NULL. Exiting...\n";
|
||||||
Tcl_Exit (0);
|
Tcl_Finalize();
|
||||||
}
|
}
|
||||||
Tk_Name(mainWindow) = Tk_GetUid (Tk_SetAppName (mainWindow, "Draw"));
|
Tk_Name(mainWindow) = Tk_GetUid (Tk_SetAppName (mainWindow, "Draw"));
|
||||||
}
|
}
|
||||||
@@ -2147,7 +2147,7 @@ static DWORD WINAPI tkLoop(VOID)
|
|||||||
toLoop = (Tk_GetNumMainWindows() > 0) || Draw_VirtualWindows;
|
toLoop = (Tk_GetNumMainWindows() > 0) || Draw_VirtualWindows;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
Tcl_Exit(0);
|
Tcl_Finalize();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user