Fix critical error

This patch fixes a critical error regarding the color tabs when trying
to display the search results and also on the scheduled transactions
template.
Patch by Robert Fewell
BP

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21179 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Geert Janssens 2011-08-13 15:33:07 +00:00
parent c4c54ab4a4
commit 4a24dd94b7

View File

@ -1322,14 +1322,15 @@ gnc_plugin_page_register_get_tab_color (GncPluginPage *plugin_page)
reg = gnc_ledger_display_get_split_register (ld);
ledger_type = gnc_ledger_display_type (ld);
leader = gnc_ledger_display_leader (ld);
color = xaccAccountGetColor (leader);
switch (ledger_type)
{
case LD_SINGLE:
color = xaccAccountGetColor (leader);
return g_strdup(color ? color : "");
case LD_SUBACCOUNT:
color = xaccAccountGetColor (leader);
return g_strdup_printf("%s+", color ? color : "");
default: