This change (on my own code snippet btw, see commit 5a1a35ca5a6) was necessary because otherwise, the StringPrintf call that is done below (which would then use a WindowTitleU.Buffer == NULL) would generate the harderror dialog title: "(null)" (in addition to other strings being appended), instead of just an empty string. And so the bug is that I forgot to adjust the condition that needs to be checked before freeing the window title string (if it has been allocated).
Hermès > -----Message d'origine----- > De : Thomas Faber [mailto:thomas.fa...@reactos.org] > Envoyé : samedi 9 juin 2018 09:21 > À : ros-dev@reactos.org; Hermès Bélusca-Maïto > Objet : Re: [ros-diffs] 01/01: [USERSRV] HardError: Fix compilation warning; > fix few comments; fix the default empty window title string. > > On 2018-04-08 16:17, Hermès Bélusca-Maïto wrote: > > /* Retrieve the window title of the client, if it has one */ > > - RtlInitEmptyUnicodeString(&WindowTitleU, NULL, 0); > > + RtlInitEmptyUnicodeString(&WindowTitleU, L"", 0); > > This looks like a bug. Can you explain why you think it's necessary please? > > In particular, it will break this: > > if (WindowTitleU.Buffer) RtlFreeUnicodeString(&WindowTitleU); > > > Thanks, > Thomas _______________________________________________ Ros-dev mailing list Ros-dev@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev