Fix two memory leaks and prevent showing two dialog boxes with the same error message.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2415 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2008-03-26 17:52:27 +00:00
parent b975bbe11d
commit 898c0602de
2 changed files with 7 additions and 3 deletions

View File

@ -4,6 +4,9 @@
Update Scintilla to version 1.76.
* scintilla/include/Scintilla.iface:
Add this file for plugin authors.
* plugins/vcdiff.c:
Fix two memory leaks and prevent showing two dialog boxes with the
same error message.
2008-03-26 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>

View File

@ -357,10 +357,10 @@ static gchar *make_diff(const gchar *filename, gint cmd)
{
p_ui->set_statusbar(FALSE, _("No changes were made."));
}
if (NZV(std_error))
/* win32_spawn() returns sometimes TRUE but error is set anyway, has to be fixed */
if (error != NULL)
{
p_dialogs->show_msgbox(1, _("VCdiff command sent errors:\n%s\n."), std_error);
g_error_free(error);
}
}
else
@ -378,6 +378,7 @@ static gchar *make_diff(const gchar *filename, gint cmd)
argv[0]);
}
p_ui->set_statusbar(FALSE, _("An error occurred (%s)."), msg);
g_free(msg);
}
g_free(dir);