1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Add a commentary assertion in config dialog setup.

Coverity complained that some paths through the loop in the
WM_INITDIALOG handler might leave firstpath==NULL. In fact this can't
happen because the input data to that loop is largely static and we
know what it looks like, but it doesn't seem unreasonable to add an
assertion anyway, to keep static checkers happy and as an explanatory
quasi-comment for humans.
This commit is contained in:
Simon Tatham 2015-07-25 11:07:38 +01:00
parent b266d671ac
commit 88b4db0c50

View File

@ -505,6 +505,7 @@ static int CALLBACK GenericMainDlgProc(HWND hwnd, UINT msg,
* And create the actual control set for that panel, to
* match the initial treeview selection.
*/
assert(firstpath); /* config.c must have given us _something_ */
create_controls(hwnd, firstpath);
dlg_refresh(NULL, &dp); /* and set up control values */
}