summaryrefslogtreecommitdiffstats
path: root/unix/tkUnixWm.c
diff options
context:
space:
mode:
authorjenglish@flightlab.com <jenglish>2009-04-04 03:11:50 (GMT)
committerjenglish@flightlab.com <jenglish>2009-04-04 03:11:50 (GMT)
commit87ec56d8b8605f0172923f0e45e2321466e1eed4 (patch)
tree30edecb8e0dd5a2f4ed5c137daf688e909e2daba /unix/tkUnixWm.c
parent96aa06789308d451c44b00772b954a1759d907a7 (diff)
downloadtk-87ec56d8b8605f0172923f0e45e2321466e1eed4.zip
tk-87ec56d8b8605f0172923f0e45e2321466e1eed4.tar.gz
tk-87ec56d8b8605f0172923f0e45e2321466e1eed4.tar.bz2
Don't Panic [Bug 1789819].
Diffstat (limited to 'unix/tkUnixWm.c')
-rw-r--r--unix/tkUnixWm.c29
1 files changed, 9 insertions, 20 deletions
diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c
index ec90e5c..d55c4ff 100644
--- a/unix/tkUnixWm.c
+++ b/unix/tkUnixWm.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkUnixWm.c,v 1.58.2.1 2008/11/15 00:37:30 patthoyts Exp $
+ * RCS: @(#) $Id: tkUnixWm.c,v 1.58.2.2 2009/04/04 03:11:50 jenglish Exp $
*/
#include "tkUnixInt.h"
@@ -822,9 +822,7 @@ TkWmDeadWindow(
for (prevPtr = (WmInfo *) winPtr->dispPtr->firstWmPtr; ;
prevPtr = prevPtr->nextPtr) {
- if (prevPtr == NULL) {
- Tcl_Panic("couldn't unlink window in TkWmDeadWindow");
- }
+ /* ASSERT: prevPtr != NULL [Bug 1789819] */
if (prevPtr->nextPtr == wmPtr) {
prevPtr->nextPtr = wmPtr->nextPtr;
break;
@@ -917,9 +915,7 @@ TkWmDeadWindow(
}
}
}
- if (wmPtr->numTransients != 0) {
- Tcl_Panic("numTransients should be 0");
- }
+ /* ASSERT: numTransients == 0 [Bug 1789819] */
if (wmPtr->masterPtr != NULL) {
wmPtr2 = wmPtr->masterPtr->wmInfoPtr;
@@ -3186,9 +3182,8 @@ WmStackorderCmd(
if (objc == 3) {
windows = TkWmStackorderToplevel(winPtr);
- if (windows == NULL) {
- Tcl_Panic("TkWmStackorderToplevel failed");
- } else {
+ if (windows != NULL) {
+ /* ASSERT: true [Bug 1789819]*/
for (window_ptr = windows; *window_ptr ; window_ptr++) {
Tcl_AppendElement(interp, (*window_ptr)->pathName);
}
@@ -3242,13 +3237,7 @@ WmStackorderCmd(
index2 = (window_ptr - windows);
}
}
- if (index1 == -1) {
- Tcl_Panic("winPtr window not found");
- }
- if (index2 == -1) {
- Tcl_Panic("winPtr2 window not found");
- }
-
+ /* ASSERT: index1 != -1 && index2 != -2 [Bug 1789819] */
ckfree((char *) windows);
}
@@ -6228,9 +6217,9 @@ TkWmStackorderToplevel(
*window_ptr++ = childWinPtr;
}
}
- if ((window_ptr - windows) != table.numEntries) {
- Tcl_Panic("num matched toplevel windows does not equal num children");
- }
+ /* ASSERT: window_ptr - windows == table.numEntries
+ * (#matched toplevel windows == #children) [Bug 1789819]
+ */
*window_ptr = NULL;
if (numChildren) {
XFree((char *) children);