From 133d3be9110cc4990b6e81ea24fd47dbefcec49e Mon Sep 17 00:00:00 2001 From: barrett Date: Fri, 28 Sep 2012 20:55:40 +0000 Subject: [PATCH] Solved a double free. --- application/views/SearchBarTextControl.cpp | 2 +- application/views/SearchBarTextControl.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/application/views/SearchBarTextControl.cpp b/application/views/SearchBarTextControl.cpp index 67d5c48..77432fe 100644 --- a/application/views/SearchBarTextControl.cpp +++ b/application/views/SearchBarTextControl.cpp @@ -24,7 +24,7 @@ SearchBarTextControl::SearchBarTextControl(BMessage* message) rgb_color color = tint_color(ViewColor(), B_DARKEN_3_TINT); TextView()->SetFontAndColor(NULL, B_FONT_ALL, &color); TextView()->MakeSelectable(false); - SetModificationMessage(message); + SetModificationMessage(new BMessage(*message)); } diff --git a/application/views/SearchBarTextControl.h b/application/views/SearchBarTextControl.h index be7521d..b6889c3 100644 --- a/application/views/SearchBarTextControl.h +++ b/application/views/SearchBarTextControl.h @@ -10,6 +10,7 @@ class SearchBarTextControl : public BTextControl { public: SearchBarTextControl(BMessage* message); + virtual void KeyDown(const char* bytes, int32 numBytes); };