In the assignment operator, watch out if the passed message is ourself.
Fixes a crash in WonderBrush when dragging images over the layer list to import them and triggering auto-scrolling. WonderBrush caches the drag message and appearantly calls it's own MouseMoved() hood with the cached message from within the auto-scrolling code. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29464 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -164,6 +164,9 @@ BMessage::operator=(const BMessage &other)
|
|||||||
{
|
{
|
||||||
DEBUG_FUNCTION_ENTER;
|
DEBUG_FUNCTION_ENTER;
|
||||||
|
|
||||||
|
if (this == &other)
|
||||||
|
return *this;
|
||||||
|
|
||||||
_Clear();
|
_Clear();
|
||||||
|
|
||||||
fHeader = (message_header *)malloc(sizeof(message_header));
|
fHeader = (message_header *)malloc(sizeof(message_header));
|
||||||
|
|||||||
Reference in New Issue
Block a user