Fix potential uninitialized variable bug in BLayout::AllUnarchived().
BMessage::GetInfo() doesn't set the count output var in error cases.
This commit is contained in:
parent
9f0292314d
commit
981c729bdc
@ -468,7 +468,7 @@ BLayout::AllUnarchived(const BMessage* from)
|
||||
if (err != B_OK)
|
||||
return err;
|
||||
|
||||
int32 itemCount;
|
||||
int32 itemCount = 0;
|
||||
unarchiver.ArchiveMessage()->GetInfo(kLayoutItemField, NULL, &itemCount);
|
||||
for (int32 i = 0; i < itemCount && err == B_OK; i++) {
|
||||
BLayoutItem* item;
|
||||
|
Loading…
Reference in New Issue
Block a user