summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXWm.c
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2019-08-21 02:44:02 (GMT)
committerKevin Walzer <kw@codebykevin.com>2019-08-21 02:44:02 (GMT)
commit87d33346e9d88d45da43ba95853f819923a25a6f (patch)
treed7eea2749052b1114877df7b460720802ec7b6f0 /macosx/tkMacOSXWm.c
parenta43842093ab379f2aec68ded26955e68d55c9c47 (diff)
downloadtk-87d33346e9d88d45da43ba95853f819923a25a6f.zip
tk-87d33346e9d88d45da43ba95853f819923a25a6f.tar.gz
tk-87d33346e9d88d45da43ba95853f819923a25a6f.tar.bz2
Remove crash, replace with NSLog message calling for update if MacWindowStyle command does not retrieve window apperance correctly
Diffstat (limited to 'macosx/tkMacOSXWm.c')
-rw-r--r--macosx/tkMacOSXWm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index 5d96677..e3047fa 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -5910,6 +5910,7 @@ WmWinAppearance(
#else
NSString *appearance;
#endif // MAC_OS_X_VERSION_MAX_ALLOWED >= 101300
+
const char *resultString = "unrecognized";
NSWindow *win = TkMacOSXDrawableWindow(winPtr->window);
if (win) {
@@ -5928,7 +5929,9 @@ WmWinAppearance(
result = Tcl_NewStringObj(resultString, strlen(resultString));
}
if (result == NULL) {
- Tcl_Panic("Failed to read appearance name.");
+ NSLog(@"Failed to read appearance name; try calling update before setting the appearance of the window.");
+ return TCL_OK;
+ // Tcl_Panic("Failed to read appearance name.");
}
if (objc == 4) {
int index;