Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IMAPFolder::close() crashes from time to time when built under MinGW #161

Open
paukonen opened this issue Feb 8, 2017 · 0 comments
Open

Comments

@paukonen
Copy link

paukonen commented Feb 8, 2017

Hello!

I built vmime with MinGW and sometimes vmime crashes on this line of IMAPFolder::close():

oldConnection->disconnect();

After some investigation I found out that sometimes (quite rearly) oldConnection happens to be NULL.

I wrapped this code with check and problem dissapeared:

if( oldConnection )
{
// Emit the "CLOSE" command to expunge messages marked
// as deleted (this is fastest than "EXPUNGE")
if (expunge)
{
if (m_mode == MODE_READ_ONLY)
throw exceptions::operation_not_supported();

    IMAPCommand::CLOSE()->send(oldConnection);
}

// Close this folder connection
oldConnection->disconnect();

}

Maybe this problem is specific to MinGW, I didn't checked it with other toolchains.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant