Don't call GObject.get_type() in ctor

Just experienced a crash in the SmtpOutboxEmailIdentifier
constructor trying to get its own type name.  Past experience
has shown that calling into GObject (or GType) in the constructor
before calling base() is dangerous, so changing this to a flat
string.
This commit is contained in:
Jim Nelson 2013-09-05 18:23:31 -07:00
parent 3bb0dca6f5
commit 9fb2fd9611

View file

@ -8,7 +8,7 @@ private class Geary.SmtpOutboxEmailIdentifier : Geary.EmailIdentifier {
public int64 ordering { get; private set; }
public SmtpOutboxEmailIdentifier(int64 message_id, int64 ordering) {
base ("%s:%lld".printf(get_type().name(), message_id));
base ("SmtpOutboxEmailIdentifer:%s".printf(message_id.to_string()));
this.ordering = ordering;
}