[vte/vte-0-36] debug: Fix segfault
- From: Egmont Koblinger <egmontkob src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/vte-0-36] debug: Fix segfault
- Date: Wed, 22 Jan 2014 00:50:38 +0000 (UTC)
commit adb2aafe5d1eeca4f19d6c10b81f9ba18415ddcd
Author: Egmont Koblinger <egmont gmail com>
Date: Wed Jan 22 01:49:43 2014 +0100
debug: Fix segfault
src/vte.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/src/vte.c b/src/vte.c
index 8c07893..31a777d 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -2522,13 +2522,14 @@ _vte_terminal_set_color_internal(VteTerminal *terminal,
{
VtePaletteColor *palette_color = &terminal->pvt->palette[entry];
- _vte_debug_print(VTE_DEBUG_MISC,
- "Set %s color[%d] to (%04x,%04x,%04x).\n",
- source == VTE_COLOR_SOURCE_ESCAPE ? "escape" : "API",
- entry, proposed->red, proposed->green, proposed->blue);
/* Save the requested color. */
if (proposed != NULL) {
+ _vte_debug_print(VTE_DEBUG_MISC,
+ "Set %s color[%d] to (%04x,%04x,%04x).\n",
+ source == VTE_COLOR_SOURCE_ESCAPE ? "escape" : "API",
+ entry, proposed->red, proposed->green, proposed->blue);
+
if (palette_color->sources[source].is_set &&
palette_color->sources[source].color.red == proposed->red &&
palette_color->sources[source].color.green == proposed->green &&
@@ -2540,6 +2541,11 @@ _vte_terminal_set_color_internal(VteTerminal *terminal,
palette_color->sources[source].color.green = proposed->green;
palette_color->sources[source].color.blue = proposed->blue;
} else {
+ _vte_debug_print(VTE_DEBUG_MISC,
+ "Reset %s color[%d].\n",
+ source == VTE_COLOR_SOURCE_ESCAPE ? "escape" : "API",
+ entry);
+
if (!palette_color->sources[source].is_set) {
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]