* fix small mem leak
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27854 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -218,13 +218,15 @@ IconEditorApp::ReadyToRun()
|
|||||||
{
|
{
|
||||||
// create file panels
|
// create file panels
|
||||||
BMessenger messenger(this, this);
|
BMessenger messenger(this, this);
|
||||||
|
BMessage message(B_REFS_RECEIVED);
|
||||||
fOpenPanel = new BFilePanel(B_OPEN_PANEL,
|
fOpenPanel = new BFilePanel(B_OPEN_PANEL,
|
||||||
&messenger,
|
&messenger,
|
||||||
NULL,
|
NULL,
|
||||||
B_FILE_NODE,
|
B_FILE_NODE,
|
||||||
true,
|
true,
|
||||||
new BMessage(B_REFS_RECEIVED));
|
&message);
|
||||||
|
|
||||||
|
message.what = MSG_SAVE_AS;
|
||||||
fSavePanel = new SavePanel("save panel",
|
fSavePanel = new SavePanel("save panel",
|
||||||
&messenger,
|
&messenger,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -232,7 +234,7 @@ IconEditorApp::ReadyToRun()
|
|||||||
| B_DIRECTORY_NODE
|
| B_DIRECTORY_NODE
|
||||||
| B_SYMLINK_NODE,
|
| B_SYMLINK_NODE,
|
||||||
false,
|
false,
|
||||||
new BMessage(MSG_SAVE_AS));
|
&message);
|
||||||
|
|
||||||
// create main window
|
// create main window
|
||||||
BMessage settings('stns');
|
BMessage settings('stns');
|
||||||
@@ -515,7 +517,7 @@ IconEditorApp::_Open(const BMessenger& externalObserver, const uint8* data,
|
|||||||
// the reason is that the LittleEndianBuffer knows read and write
|
// the reason is that the LittleEndianBuffer knows read and write
|
||||||
// mode, in this case it is used read-only, and it does not assume
|
// mode, in this case it is used read-only, and it does not assume
|
||||||
// ownership of the buffer
|
// ownership of the buffer
|
||||||
|
|
||||||
if (ret < B_OK) {
|
if (ret < B_OK) {
|
||||||
// inform user of failure at this point
|
// inform user of failure at this point
|
||||||
BString helper("Opening the icon failed!");
|
BString helper("Opening the icon failed!");
|
||||||
@@ -524,7 +526,7 @@ IconEditorApp::_Open(const BMessenger& externalObserver, const uint8* data,
|
|||||||
"Bummer", NULL, NULL);
|
"Bummer", NULL, NULL);
|
||||||
// launch alert asynchronously
|
// launch alert asynchronously
|
||||||
alert->Go(NULL);
|
alert->Go(NULL);
|
||||||
|
|
||||||
delete icon;
|
delete icon;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -560,7 +562,7 @@ DocumentSaver*
|
|||||||
IconEditorApp::_CreateSaver(const entry_ref& ref, uint32 exportMode)
|
IconEditorApp::_CreateSaver(const entry_ref& ref, uint32 exportMode)
|
||||||
{
|
{
|
||||||
DocumentSaver* saver;
|
DocumentSaver* saver;
|
||||||
|
|
||||||
switch (exportMode) {
|
switch (exportMode) {
|
||||||
case EXPORT_MODE_FLAT_ICON:
|
case EXPORT_MODE_FLAT_ICON:
|
||||||
saver = new SimpleFileSaver(new FlatIconExporter(), ref);
|
saver = new SimpleFileSaver(new FlatIconExporter(), ref);
|
||||||
|
|||||||
Reference in New Issue
Block a user