Patch by Lukasz Zemczak: fix installer crashes reported in ticket #2969.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28829 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1093,6 +1093,8 @@ PackageInfo::_AddItem(PkgItem *item, uint64 size, uint32 groups, uint32 path,
|
|||||||
uint32 i, n = fProfiles.CountItems(), mask = 1;
|
uint32 i, n = fProfiles.CountItems(), mask = 1;
|
||||||
pkg_profile *profile;
|
pkg_profile *profile;
|
||||||
|
|
||||||
|
fFiles.AddItem(item);
|
||||||
|
|
||||||
for (i = 0;i < n;i++) {
|
for (i = 0;i < n;i++) {
|
||||||
if (groups & mask) {
|
if (groups & mask) {
|
||||||
profile = static_cast<pkg_profile *>(fProfiles.ItemAt(i));
|
profile = static_cast<pkg_profile *>(fProfiles.ItemAt(i));
|
||||||
@@ -1117,19 +1119,3 @@ PackageInfo::_AddItem(PkgItem *item, uint64 size, uint32 groups, uint32 path,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// #pragma mark -
|
|
||||||
|
|
||||||
|
|
||||||
pkg_profile::~pkg_profile()
|
|
||||||
{
|
|
||||||
PkgItem *iter = 0;
|
|
||||||
while (1) {
|
|
||||||
iter = static_cast<PkgItem *>(items.RemoveItem((long int)0));
|
|
||||||
if (iter)
|
|
||||||
delete iter;
|
|
||||||
else
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ class PackageInfo {
|
|||||||
|
|
||||||
struct pkg_profile {
|
struct pkg_profile {
|
||||||
pkg_profile() : items(10), space_needed(0), path_type(P_SYSTEM_PATH) {}
|
pkg_profile() : items(10), space_needed(0), path_type(P_SYSTEM_PATH) {}
|
||||||
~pkg_profile();
|
~pkg_profile() {}
|
||||||
|
|
||||||
BString name;
|
BString name;
|
||||||
BString description;
|
BString description;
|
||||||
|
|||||||
Reference in New Issue
Block a user