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:
committed by
waddlesplash
parent
48de299d54
commit
3548a2eb71
@@ -323,14 +323,14 @@ const char*
|
|||||||
FindWindow::QueryName() const
|
FindWindow::QueryName() const
|
||||||
{
|
{
|
||||||
if (fFromTemplate) {
|
if (fFromTemplate) {
|
||||||
if (!fQueryNameFromTemplate.Length()) {
|
if (!fQueryNameFromTemplate.Length() && fFile != NULL) {
|
||||||
fFile->ReadAttrString(kAttrQueryTemplateName,
|
fFile->ReadAttrString(kAttrQueryTemplateName,
|
||||||
&fQueryNameFromTemplate);
|
&fQueryNameFromTemplate);
|
||||||
}
|
}
|
||||||
|
|
||||||
return fQueryNameFromTemplate.String();
|
return fQueryNameFromTemplate.String();
|
||||||
}
|
}
|
||||||
if (!fFile)
|
if (fFile == NULL)
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
return fRef.name;
|
return fRef.name;
|
||||||
|
|||||||
Reference in New Issue
Block a user