pidgin/pidgin

Fix a crash on shutdown in kwallet if the wallet was never opened.

The wallet instance variable was not initialized so if the wallet was never opened we were trying to delete and invalid pointer.

Also update the dispose method of the provider to close the wallet as the
tasks in the queue hold a reference to the provider instance as the source
object in their tasks.

Testing Done:
Ran locally with both the kwallet and secret service providers.

Reviewed at https://reviews.imfreedom.org/r/581/
<?xml version='1.0' encoding="ISO-8859-1"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
]>
<chapter id="chapter-signals-core">
<title>Core signals</title>
<refsect1 id="core.signals" role="signal_proto">
<title role="signal_proto.title">List of signals</title>
<synopsis>
&quot;<link linkend="core-quitting">quitting</link>&quot;
&quot;<link linkend="core-uri-handler">uri-handler</link>&quot;
</synopsis>
</refsect1>
<refsect1 id="core.signal-details" role="signals">
<title role="signals.title">Signal details</title>
<refsect2 id="core-quitting" role="signal">
<title>The <literal>&quot;quitting&quot;</literal> signal</title>
<programlisting>
void user_function (gpointer user_data)
</programlisting>
<para>
Emitted when libpurple is quitting.
</para>
<variablelist role="params">
<varlistentry>
<term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2 id="core-uri-handler" role="signal">
<title>The <literal>&quot;uri-handler&quot;</literal> signal</title>
<programlisting>
gboolean user_function (const gchar *proto,
const gchar *cmd,
GHashTable *params,
gpointer user_data)
</programlisting>
<para>
Emitted when handling a registered URI.
</para>
<variablelist role="params">
<varlistentry>
<term><parameter>proto</parameter>&#160;:</term>
<listitem><simpara>The protocol of the URI.</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter>cmd</parameter>&#160;:</term>
<listitem><simpara>The 'command' of the URI.</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter>params</parameter>&#160;:</term>
<listitem><simpara>Any key/value parameters from the URI.</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem>
</varlistentry>
</variablelist>
</refsect2>
</refsect1>
</chapter>