Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions artpaint/windows/BrushStoreWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,22 +240,26 @@ BrushStoreWindow::brush_adder(void* data)
{
BrushStoreWindow* this_pointer = (BrushStoreWindow*)data;

this_pointer->Lock();
this_pointer->BeginViewTransaction();
if (this_pointer != NULL) {
BList temp_list(*brush_data);
if (temp_list.CountItems() > 0) {
Brush* a_brush = new Brush(*(brush_info*)(temp_list.ItemAt(0)));

for (int32 i = 0; i < temp_list.CountItems(); i++) {
a_brush->ModifyBrush(*(brush_info*)(temp_list.ItemAt(i)));
this_pointer->Lock();
this_pointer->store_view->AddBrush(a_brush);
this_pointer->Unlock();
}

delete a_brush;
}
this_pointer->EndViewTransaction();
this_pointer->Unlock();
return B_OK;
}
this_pointer->EndViewTransaction();
this_pointer->Unlock();
return B_ERROR;
}

Expand Down