equal
deleted
inserted
replaced
348 scr_LogPrint(LPRINT_NORMAL, "No such color name"); |
348 scr_LogPrint(LPRINT_NORMAL, "No such color name"); |
349 g_free(snick); |
349 g_free(snick); |
350 g_free(mnick); |
350 g_free(mnick); |
351 } else { |
351 } else { |
352 nickcolor *nc = g_new(nickcolor, 1); |
352 nickcolor *nc = g_new(nickcolor, 1); |
|
353 nickcolor *oc; |
353 ensure_string_htable(&nickcolors, NULL); |
354 ensure_string_htable(&nickcolors, NULL); |
354 nc->manual = TRUE; |
355 nc->manual = TRUE; |
355 nc->color = cl; |
356 nc->color = cl; |
356 // Free the struct, if any there already |
357 // Free the struct, if any there already |
357 g_free(g_hash_table_lookup(nickcolors, mnick)); |
358 if ((oc = g_hash_table_lookup(nickcolors, mnick))) { |
|
359 g_free(oc -> color); |
|
360 g_free(oc); |
|
361 } |
358 // Save the new ones |
362 // Save the new ones |
359 g_hash_table_replace(nickcolors, mnick, nc); |
363 g_hash_table_replace(nickcolors, mnick, nc); |
360 g_hash_table_replace(nickcolors, snick, nc); |
364 g_hash_table_replace(nickcolors, snick, nc); |
361 need_update = TRUE; |
365 need_update = TRUE; |
362 } |
366 } |