Segmentation fault on append to Glib::ustring



Probably this is more a libcurl question than a gtkmm one, but i saw an example in which a std::string works so:

When i let curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, writefunction), on my ustring:

int writefunction(char *data, size_t size, size_t nmemb, Glib::ustring *buffer)
    {
        if(buffer!=NULL)
        {
            buffer->append(data, size*nmemb);
            return size*nmemb;
        }
        return 0;
    }

it gives always a segmentation fault.

Attached the code.

Attachment: code.zip
Description: Zip archive



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]