Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Sat, 25 Oct 2014 13:16:46 UTC Commit: c40d3342dbdf30cf578bcf6ff39566681c850a3f https://github.com/geany/geany-plugins/commit/c40d3342dbdf30cf578bcf6ff39566...
Log Message: ----------- debugger: Don't remove non-existent GSources
Modified Paths: -------------- debugger/src/dbm_gdb.c
Modified: debugger/src/dbm_gdb.c 25 lines changed, 21 insertions(+), 4 deletions(-) =================================================================== @@ -192,6 +192,7 @@ static void on_gdb_exit(GPid pid, gint status, gpointer data) files = NULL; g_source_remove(gdb_src_id); + gdb_src_id = 0; dbg_cbs->set_exited(0); } @@ -325,7 +326,11 @@ static gboolean on_read_async_output(GIOChannel * src, GIOCondition cond, gpoint GList *commands = (GList*)data; gchar *coma;
- g_source_remove(gdb_id_out); + if (gdb_id_out) + { + g_source_remove(gdb_id_out); + gdb_id_out = 0; + }
lines = read_until_prompt(); g_list_foreach(lines, (GFunc)g_free, NULL); @@ -367,7 +372,11 @@ static gboolean on_read_async_output(GIOChannel * src, GIOCondition cond, gpoint free_commands_queue(commands);
/* removing read callback */ - g_source_remove(gdb_id_out); + if (gdb_id_out) + { + g_source_remove(gdb_id_out); + gdb_id_out = 0; + }
/* update source files list */ update_files(); @@ -491,7 +500,11 @@ static gboolean on_read_from_gdb(GIOChannel * src, GIOCondition cond, gpointer d char *reason;
/* removing read callback (will pulling all output left manually) */ - g_source_remove(gdb_id_out); + if (gdb_id_out) + { + g_source_remove(gdb_id_out); + gdb_id_out = 0; + }
/* looking for a reason to stop */ reason = strstr(record, "reason=""); @@ -580,7 +593,11 @@ static gboolean on_read_from_gdb(GIOChannel * src, GIOCondition cond, gpointer d char *msg;
/* removing read callback (will pulling all output left manually) */ - g_source_remove(gdb_id_out); + if (gdb_id_out) + { + g_source_remove(gdb_id_out); + gdb_id_out = 0; + }
/* set debugger stopped if is running */ if (DBS_STOPPED != debug_get_state())
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).