soc.2009.transport: 046089ac: Fixed AdhocRepeater segfault when user c...

hanzz at soc.pidgin.im hanzz at soc.pidgin.im
Thu Jul 2 03:10:35 EDT 2009


-----------------------------------------------------------------
Revision: 046089ac1ca9ae646533c277f73fed5c370e02d3
Ancestor: fd1124dc2a92a2c8acabe3fe576243ae8e809e23
Author: hanzz at soc.pidgin.im
Date: 2009-07-02T07:08:46
Branch: im.pidgin.soc.2009.transport
URL: http://d.pidgin.im/viewmtn/revision/info/046089ac1ca9ae646533c277f73fed5c370e02d3

Modified files:
        adhocrepeater.cpp

ChangeLog: 

Fixed AdhocRepeater segfault when user cancels dialog

-------------- next part --------------
============================================================
--- adhocrepeater.cpp	4c1bf33c12b6fe3f9d16c7eb8f9ec68e2d71027c
+++ adhocrepeater.cpp	8f90c89c1588aed6da5e9a12cb07ded9d4e759b0
@@ -162,10 +162,12 @@ bool AdhocRepeater::handleIq(const IQ &s
 		main->j->send(response);
 
 		if (m_type == PURPLE_REQUEST_FIELDS) {
-			((PurpleRequestFieldsCb) m_cancel_cb) (m_requestData, m_fields);
+			if (m_cancel_cb)
+				((PurpleRequestFieldsCb) m_cancel_cb) (m_requestData, m_fields);
 		}
 		else if (m_type == PURPLE_REQUEST_INPUT) {
-			((PurpleRequestInputCb) m_cancel_cb)(m_requestData, m_defaultString.c_str());
+			if (m_cancel_cb)
+				((PurpleRequestInputCb) m_cancel_cb)(m_requestData, m_defaultString.c_str());
 		}
 
 		g_timeout_add(0,&removeRepeater,this);


More information about the Commits mailing list