DeskCalc: Use IsLocked() instead of Lock()
As suggested by korli.
This commit is contained in:
@@ -351,7 +351,7 @@ CalcView::MessageReceived(BMessage* message)
|
|||||||
{
|
{
|
||||||
// access system clipboard
|
// access system clipboard
|
||||||
ClipboardLocker locker(be_clipboard);
|
ClipboardLocker locker(be_clipboard);
|
||||||
if (locker.Lock()) {
|
if (locker.IsLocked()) {
|
||||||
BMessage* clipper = be_clipboard->Data();
|
BMessage* clipper = be_clipboard->Data();
|
||||||
if (clipper)
|
if (clipper)
|
||||||
Paste(clipper);
|
Paste(clipper);
|
||||||
@@ -809,13 +809,13 @@ CalcView::Copy()
|
|||||||
{
|
{
|
||||||
// access system clipboard
|
// access system clipboard
|
||||||
ClipboardLocker locker(be_clipboard);
|
ClipboardLocker locker(be_clipboard);
|
||||||
if (!locker.Lock())
|
if (!locker.IsLocked())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (be_clipboard->Clear() != B_OK)
|
if (be_clipboard->Clear() != B_OK)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
BMessage* clipper;
|
BMessage* clipper = be_clipboard->Data();
|
||||||
clipper = be_clipboard->Data();
|
|
||||||
if (clipper == NULL)
|
if (clipper == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user