CID 630 : Allocation may fail.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38042 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
9b957f41ab
commit
889a547780
@ -1088,10 +1088,14 @@ IconView::ShowIconHeap(bool show)
|
||||
if (data == NULL) {
|
||||
// no vector icon or failed to get bitmap
|
||||
// try bitmap icon
|
||||
data = resources->LoadResource(B_LARGE_ICON_TYPE, "icon heap", NULL);
|
||||
data = resources->LoadResource(B_LARGE_ICON_TYPE, "icon heap",
|
||||
NULL);
|
||||
if (data != NULL) {
|
||||
fHeapIcon = Icon::AllocateBitmap(B_LARGE_ICON, B_CMAP8);
|
||||
memcpy(fHeapIcon->Bits(), data, fHeapIcon->BitsLength());
|
||||
if (fHeapIcon != NULL) {
|
||||
memcpy(fHeapIcon->Bits(), data,
|
||||
fHeapIcon->BitsLength());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user