Skip to content

Commit

Permalink
Eliminate unnecessary Tcl_Panic()
Browse files Browse the repository at this point in the history
  • Loading branch information
jan.nijtmans committed Nov 13, 2023
1 parent 65611c0 commit 7b18f85
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions generic/tkCanvas.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,9 @@ ItemIndex(
return itemPtr->typePtr->indexProc(interp, (Tk_Canvas) canvasPtr,
itemPtr, objPtr, indexPtr);
} else {
#if defined(TK_NO_DEPRECATED) || (TK_MAJOR_VERSION > 8)
Tcl_Panic("Flag TK_CONFIG_OBJS is mandatory");
#if defined(TK_NO_DEPRECATED)
Tcl_AppendResult(interp, "Flag TK_CONFIG_OBJS is mandatory", (void *)NULL);
return TCL_ERROR;
#else
return itemPtr->typePtr->indexProc(interp, (Tk_Canvas) canvasPtr,
itemPtr, (Tcl_Obj *) Tcl_GetString(objPtr), indexPtr);
Expand Down

0 comments on commit 7b18f85

Please sign in to comment.