diff options
author | dgp <dgp@users.sourceforge.net> | 2007-10-24 12:59:29 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2007-10-24 12:59:29 (GMT) |
commit | e45899dfe4a136045461e8d0a243333b8ea5772d (patch) | |
tree | 355358c10e10a1d3a4082cb6e6a24a379af08bd8 /generic/tkFont.c | |
parent | 1716dd0b177db2823c1a9db54804b2ff72749534 (diff) | |
download | tk-e45899dfe4a136045461e8d0a243333b8ea5772d.zip tk-e45899dfe4a136045461e8d0a243333b8ea5772d.tar.gz tk-e45899dfe4a136045461e8d0a243333b8ea5772d.tar.bz2 |
merge updates from HEAD
Diffstat (limited to 'generic/tkFont.c')
-rw-r--r-- | generic/tkFont.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/generic/tkFont.c b/generic/tkFont.c index 6aeb9eb..51a7bb7 100644 --- a/generic/tkFont.c +++ b/generic/tkFont.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: tkFont.c,v 1.35.2.3 2007/09/07 01:25:34 dgp Exp $ + * RCS: @(#) $Id: tkFont.c,v 1.35.2.4 2007/10/24 12:59:32 dgp Exp $ */ #include "tkInt.h" @@ -944,7 +944,7 @@ RecomputeWidgets( int TkCreateNamedFont( - Tcl_Interp *interp, /* Interp for error return. */ + Tcl_Interp *interp, /* Interp for error return (can be NULL). */ Tk_Window tkwin, /* A window associated with interp. */ const char *name, /* Name for the new named font. */ TkFontAttributes *faPtr) /* Attributes for the new named font. */ @@ -961,9 +961,10 @@ TkCreateNamedFont( if (!isNew) { nfPtr = (NamedFont *) Tcl_GetHashValue(namedHashPtr); if (nfPtr->deletePending == 0) { - Tcl_ResetResult(interp); - Tcl_AppendResult(interp, "named font \"", name, - "\" already exists", NULL); + if (interp) { + Tcl_AppendResult(interp, "named font \"", name, + "\" already exists", NULL); + } return TCL_ERROR; } @@ -1001,7 +1002,7 @@ TkCreateNamedFont( int TkDeleteNamedFont( - Tcl_Interp *interp, /* Interp for error return. */ + Tcl_Interp *interp, /* Interp for error return (can be NULL). */ Tk_Window tkwin, /* A window associated with interp. */ CONST char *name) /* Name for the new named font. */ { @@ -1013,8 +1014,10 @@ TkDeleteNamedFont( namedHashPtr = Tcl_FindHashEntry(&fiPtr->namedTable, name); if (namedHashPtr == NULL) { - Tcl_AppendResult(interp, "named font \"", name, - "\" doesn't exist", NULL); + if (interp) { + Tcl_AppendResult(interp, "named font \"", name, + "\" doesn't exist", NULL); + } return TCL_ERROR; } nfPtr = (NamedFont *) Tcl_GetHashValue(namedHashPtr); |