oleview: Fix a crash on null helpstring and name on library level.

oldstable
Nikolay Sivov 2010-12-31 15:46:50 +03:00 committed by Alexandre Julliard
parent 9e871539d1
commit cd028045f1
1 changed files with 16 additions and 10 deletions

View File

@ -1227,6 +1227,10 @@ static int PopulateTree(void)
AddSpaces(tld, TAB_SIZE);
wsprintfW(wszText, wszFormat2, pTLibAttr->wMajorVerNum, pTLibAttr->wMinorVerNum);
AddToTLDataStrW(tld, wszText);
if (bstrData)
{
/* helpstring is optional */
AddToTLDataStrW(tld, wszComa);
AddToTLDataStrW(tld, wszNewLine);
AddSpaces(tld, TAB_SIZE);
@ -1236,11 +1240,13 @@ static int PopulateTree(void)
AddToTLDataStrW(tld, bstrData);
AddToTLDataStrW(tld, wszInvertedComa);
AddToTLDataStrW(tld, wszCloseBrackets2);
}
AddToTLDataStrW(tld, wszNewLine);
AddToTLDataStrW(tld, wszCloseBrackets1);
AddToTLDataStrW(tld, wszNewLine);
AddToTLDataStrW(tld, wszLibrary);
AddToTLDataStrW(tld, bstrName);
if (bstrName) AddToTLDataStrW(tld, bstrName);
AddToTLDataStrW(tld, wszNewLine);
AddToTLDataStrW(tld, wszOpenBrackets3);
AddToTLDataStrW(tld, wszNewLine);