mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-30 04:20:23 +00:00
Minor change in cmd::ClearRect to avoid static analysis confusion (close #1478)
The Cel argument in ClearRect() ctor must not be nullptr.
This commit is contained in:
parent
65e28c8f1e
commit
f29ead0f1d
@ -1,5 +1,5 @@
|
|||||||
// Aseprite
|
// Aseprite
|
||||||
// Copyright (C) 2001-2015 David Capello
|
// Copyright (C) 2001-2018 David Capello
|
||||||
//
|
//
|
||||||
// This program is distributed under the terms of
|
// This program is distributed under the terms of
|
||||||
// the End-User License Agreement for Aseprite.
|
// the End-User License Agreement for Aseprite.
|
||||||
@ -23,9 +23,9 @@ using namespace doc;
|
|||||||
|
|
||||||
ClearRect::ClearRect(Cel* cel, const gfx::Rect& bounds)
|
ClearRect::ClearRect(Cel* cel, const gfx::Rect& bounds)
|
||||||
{
|
{
|
||||||
app::Document* doc = static_cast<app::Document*>(cel->document());
|
ASSERT(cel);
|
||||||
|
|
||||||
Image* image = (cel ? cel->image(): NULL);
|
Image* image = cel->image();
|
||||||
if (!image)
|
if (!image)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -41,6 +41,8 @@ ClearRect::ClearRect(Cel* cel, const gfx::Rect& bounds)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
m_dstImage.reset(new WithImage(image));
|
m_dstImage.reset(new WithImage(image));
|
||||||
|
|
||||||
|
app::Document* doc = static_cast<app::Document*>(cel->document());
|
||||||
m_bgcolor = doc->bgColor(cel->layer());
|
m_bgcolor = doc->bgColor(cel->layer());
|
||||||
|
|
||||||
m_copy.reset(crop_image(image,
|
m_copy.reset(crop_image(image,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user