tracker: Fix PVS V595

Fix 'fFile' pointer was utilized at line 327
before it was verified against NULL.

Change-Id: I8214bce9a99d783b3c53a7b8c5696b0b0dfc3490
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1440
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
Murai Takashi 2019-03-14 20:33:03 +09:00 committed by waddlesplash
parent 48de299d54
commit 3548a2eb71

View File

@ -323,14 +323,14 @@ const char*
FindWindow::QueryName() const
{
if (fFromTemplate) {
if (!fQueryNameFromTemplate.Length()) {
if (!fQueryNameFromTemplate.Length() && fFile != NULL) {
fFile->ReadAttrString(kAttrQueryTemplateName,
&fQueryNameFromTemplate);
}
return fQueryNameFromTemplate.String();
}
if (!fFile)
if (fFile == NULL)
return "";
return fRef.name;