This small change could even fix some big problems with menus... unfortunately I can only reproduce them in vmware, and not in qemu

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16940 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2006-03-31 09:37:59 +00:00
parent f254998b61
commit f2e9b063a0

View File

@ -172,10 +172,10 @@ BMenu::BMenu(const char *name, float width, float height)
BMenu::~BMenu() BMenu::~BMenu()
{ {
RemoveItems(0, CountItems(), true);
DeleteMenuWindow(); DeleteMenuWindow();
RemoveItems(0, CountItems(), true);
delete fInitMatrixSize; delete fInitMatrixSize;
delete fExtraMenuData; delete fExtraMenuData;
} }
@ -193,8 +193,8 @@ BMenu::Instantiate(BMessage *data)
{ {
if (validate_instantiation(data, "BMenu")) if (validate_instantiation(data, "BMenu"))
return new BMenu(data); return new BMenu(data);
else
return NULL; return NULL;
} }