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 <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
Murai Takashi
2020-02-25 05:06:14 +00:00
committed by waddlesplash
parent 48de299d54
commit 3548a2eb71
+2 -2
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;