Fossil SCM
Cherrypick the changes [389f9fca5d] and [d0233e1792] to skip adding script commands that have a NULL name or function pointer.
Commit
d6c6a433e712a874ea0b89c6212b34d5d3778189
Parent
bf5de622e86f3fe…
1 file changed
+3
-1
+3
-1
| --- src/th_tcl.c | ||
| +++ src/th_tcl.c | ||
| @@ -423,11 +423,13 @@ | ||
| 423 | 423 | void *pContext |
| 424 | 424 | ){ |
| 425 | 425 | int i; |
| 426 | 426 | /* Add the Tcl integration commands to TH1. */ |
| 427 | 427 | for(i=0; i<(sizeof(aCommand)/sizeof(aCommand[0])); i++){ |
| 428 | - void *ctx = aCommand[i].pContext; | |
| 428 | + void *ctx; | |
| 429 | + if ( !aCommand[i].zName || !aCommand[i].xProc ) continue; | |
| 430 | + ctx = aCommand[i].pContext; | |
| 429 | 431 | /* Use Tcl interpreter for context? */ |
| 430 | 432 | if( !ctx ) ctx = pContext; |
| 431 | 433 | Th_CreateCommand(interp, aCommand[i].zName, aCommand[i].xProc, ctx, 0); |
| 432 | 434 | } |
| 433 | 435 | return TH_OK; |
| 434 | 436 |
| --- src/th_tcl.c | |
| +++ src/th_tcl.c | |
| @@ -423,11 +423,13 @@ | |
| 423 | void *pContext |
| 424 | ){ |
| 425 | int i; |
| 426 | /* Add the Tcl integration commands to TH1. */ |
| 427 | for(i=0; i<(sizeof(aCommand)/sizeof(aCommand[0])); i++){ |
| 428 | void *ctx = aCommand[i].pContext; |
| 429 | /* Use Tcl interpreter for context? */ |
| 430 | if( !ctx ) ctx = pContext; |
| 431 | Th_CreateCommand(interp, aCommand[i].zName, aCommand[i].xProc, ctx, 0); |
| 432 | } |
| 433 | return TH_OK; |
| 434 |
| --- src/th_tcl.c | |
| +++ src/th_tcl.c | |
| @@ -423,11 +423,13 @@ | |
| 423 | void *pContext |
| 424 | ){ |
| 425 | int i; |
| 426 | /* Add the Tcl integration commands to TH1. */ |
| 427 | for(i=0; i<(sizeof(aCommand)/sizeof(aCommand[0])); i++){ |
| 428 | void *ctx; |
| 429 | if ( !aCommand[i].zName || !aCommand[i].xProc ) continue; |
| 430 | ctx = aCommand[i].pContext; |
| 431 | /* Use Tcl interpreter for context? */ |
| 432 | if( !ctx ) ctx = pContext; |
| 433 | Th_CreateCommand(interp, aCommand[i].zName, aCommand[i].xProc, ctx, 0); |
| 434 | } |
| 435 | return TH_OK; |
| 436 |