Fix double free

Signed-off-by: Ingo Weinhold <[email protected]>
This commit is contained in:
Murai Takashi
2013-07-28 16:22:13 +02:00
committed by Ingo Weinhold
parent 0aea921993
commit 7f98c6653e
+3 -2
View File
@@ -311,10 +311,11 @@ get_named_icon(const char* name, BBitmap* icon, icon_size which)
size_t size;
type_code type;
status_t status = get_named_icon(name, &data, &size, &type);
if (status == B_OK)
if (status == B_OK) {
status = BIconUtils::GetVectorIcon(data, size, icon);
delete[] data;
}
delete[] data;
return status;
}