fix null pointer dereference

Program terminated with signal 11, Segmentation fault.
\#0  0x000000000041c9b0 in ekg2_conneciton_set_error (cd=cd@entry=0x1a54180, err=err@entry=0x7fff9099b6c8, format=0x443812 "Error sending to socket: ") at ekg/connections.c:237
237             debug_error("%s\n", cd->error->message);
(gdb) print cd->error
$1 = (GError *) 0x0
(gdb) up
\#1  0x000000000041d38b in ekg2_connection_write (cd=0x1a54180, buffer=buffer@entry=0x1d94ad0, length=16) at ekg/connections.c:268
268                                     ekg2_conneciton_set_error(cd, &error, _("Error sending to socket: "));

ekg2_conneciton_set_error does something like cd->error = copy(err); and
error in ekg2_connection_write comes from g_output_stream_write. As far
as I understand this should not happend, g_output_stream_write should
set error to something if it returns -1.
fix null pointer dereference (another)

Core was generated by `ekg2'.
Program terminated with signal 11, Segmentation fault.
\#0  0x000000000041c89d in ekg2_failure_callback (cd=0x1e145b0) at ekg/connections.c:344
344                     cd->disconnect_handler(s, err->message, EKG_DISCONNECT_NETWORK);
(gdb) bt
\#0  0x000000000041c89d in ekg2_failure_callback (cd=0x1e145b0) at ekg/connections.c:344
\#1  0x000000000041d3c2 in ekg2_connection_write (cd=0x1e145b0, buffer=buffer@entry=0x2520570, length=16) at ekg/connections.c:272
\#2  0x00007fa4c3fdeb01 in jabber_write (session=session@entry=0x1887c30, format=format@entry=0x7fa4c3fdf7b9 "</stream:stream>") at plugins/jabber/misc.c:31
\#3  0x00007fa4c3fcae92 in jabber_command_disconnect (name=0x7fa4c3fdfec8 "disconnect", params=0x24a80c0, session=0x1887c30, target=<optimized out>, quiet=<optimized out>) at plugins/jabber/commands.c:121
\#4  0x00000000004155cf in command_exec (target=target@entry=0x0, session=<optimized out>, session@entry=0x1887c30, xline=xline@entry=0x44288c "/disconnect", quiet=quiet@entry=3) at ekg/commands.c:2683
(gdb) print err
$1 = (GError *) 0x0
python, when handling signals check for NULL in char** fields