diff --git a/include/wx/string.h b/include/wx/string.h index 229b69b2f2..d082d97b73 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -201,7 +201,7 @@ struct WXDLLEXPORT wxStringData // we must not inline deallocation since allocation is not inlined void Free(); #else - void Unlock() { if ( !IsEmpty() && --nRefs == 0) free(); } + void Unlock() { if ( !IsEmpty() && --nRefs == 0) free(this); } #endif // if we had taken control over string memory (GetWriteBuf), it's