summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-12-03 18:00:10 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-12-03 18:00:10 (GMT)
commitcd026d544367512db80eed7ea948c68b2e0ff623 (patch)
treee83a4b7be6aa05516cf3c34cf25bf78fa4f2669e /win
parent7311d9315f8484ce3cc251cb652f3ec19eaedecb (diff)
parent5141d1a7d374a8bf342737ca4777891b499c0c64 (diff)
downloadtk-cd026d544367512db80eed7ea948c68b2e0ff623.zip
tk-cd026d544367512db80eed7ea948c68b2e0ff623.tar.gz
tk-cd026d544367512db80eed7ea948c68b2e0ff623.tar.bz2
Merge 8.6
Diffstat (limited to 'win')
-rw-r--r--win/tkWinWindow.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/win/tkWinWindow.c b/win/tkWinWindow.c
index 53432d7..d80c017 100644
--- a/win/tkWinWindow.c
+++ b/win/tkWinWindow.c
@@ -341,7 +341,7 @@ XDestroyWindow(
* Cause the given window to become visible.
*
* Results:
- * None
+ * Always returns Success or BadWindow.
*
* Side effects:
* Causes the window state to change, and generates a MapNotify event.
@@ -356,8 +356,12 @@ XMapWindow(
{
XEvent event;
TkWindow *parentPtr;
- TkWindow *winPtr = TkWinGetWinPtr(w);
+ TkWindow *winPtr;
+ if (!w) {
+ return BadWindow;
+ }
+ winPtr = TkWinGetWinPtr(w);
LastKnownRequestProcessed(display)++;
ShowWindow(Tk_GetHWND(w), SW_SHOWNORMAL);
@@ -450,7 +454,7 @@ NotifyVisibility(
* Cause the given window to become invisible.
*
* Results:
- * None
+ * Always returns Success or BadWindow.
*
* Side effects:
* Causes the window state to change, and generates an UnmapNotify event.
@@ -464,8 +468,12 @@ XUnmapWindow(
Window w)
{
XEvent event;
- TkWindow *winPtr = TkWinGetWinPtr(w);
+ TkWindow *winPtr;
+ if (!w) {
+ return BadWindow;
+ }
+ winPtr = TkWinGetWinPtr(w);
LastKnownRequestProcessed(display)++;
/*