SF.net SVN: geany-plugins:[617] trunk/geanygdb/src/gdb-ui-break.c
dmaphy at users.sourceforge.net
dmaphy at xxxxx
Sat May 2 11:40:07 UTC 2009
Revision: 617
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=617&view=rev
Author: dmaphy
Date: 2009-05-02 11:40:07 +0000 (Sat, 02 May 2009)
Log Message:
-----------
fix a crash, when trying to delete breakpoints or watchpoints without selecting one - thanks to eht16 for the patch
Modified Paths:
--------------
trunk/geanygdb/src/gdb-ui-break.c
Modified: trunk/geanygdb/src/gdb-ui-break.c
===================================================================
--- trunk/geanygdb/src/gdb-ui-break.c 2009-05-01 20:04:47 UTC (rev 616)
+++ trunk/geanygdb/src/gdb-ui-break.c 2009-05-02 11:40:07 UTC (rev 617)
@@ -100,6 +100,17 @@
delete_click(GtkWidget * w, gpointer p)
{
BkPtDlgData *bpd = p;
+
+ if (! bpd->bpi)
+ {
+ GtkWidget *dialog = gtk_message_dialog_new(GTK_WINDOW(gdbui_setup.main_window),
+ GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
+ _("No %s selected"), is_watchlist ? _("watchpoint") : _("breakpoint"));
+ gtk_dialog_run(GTK_DIALOG(dialog));
+ gtk_widget_destroy(dialog);
+ return;
+ }
+
if (confirm(is_watchlist ? _("Delete selected watchpoint?") : _("Delete selected breakpoint?")))
{
gdbui_enable(FALSE);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Plugins-Commits
mailing list