summaryrefslogtreecommitdiffstats
path: root/generic/tkConsole.c
diff options
context:
space:
mode:
authordas <das>2005-06-23 22:07:46 (GMT)
committerdas <das>2005-06-23 22:07:46 (GMT)
commit40f516583284ae68380b4b1e3b6442f5adf82e46 (patch)
treed11ce0cf18738720cc3f305468470606846b619e /generic/tkConsole.c
parente9a65d0a570eba57cd58420c25cc84640af2883e (diff)
downloadtk-40f516583284ae68380b4b1e3b6442f5adf82e46.zip
tk-40f516583284ae68380b4b1e3b6442f5adf82e46.tar.gz
tk-40f516583284ae68380b4b1e3b6442f5adf82e46.tar.bz2
* generic/tkConsole.c (TkConsolePrint): prevent potential NULL deref.
Diffstat (limited to 'generic/tkConsole.c')
-rw-r--r--generic/tkConsole.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tkConsole.c b/generic/tkConsole.c
index 28430b0..30d927a 100644
--- a/generic/tkConsole.c
+++ b/generic/tkConsole.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkConsole.c,v 1.22 2005/03/19 08:02:57 dkf Exp $
+ * RCS: @(#) $Id: tkConsole.c,v 1.23 2005/06/23 22:07:46 das Exp $
*/
#include "tk.h"
@@ -803,7 +803,7 @@ TkConsolePrint(interp, devId, buffer, size)
}
info = (ConsoleInfo *) Tcl_GetAssocData(interp, TK_CONSOLE_INFO_KEY, NULL);
- if (info->consoleInterp == NULL) {
+ if (info == NULL || info->consoleInterp == NULL) {
return;
}