mirror of
https://gitee.com/houstudio/Cdroid.git
synced 2024-12-05 21:58:44 +08:00
fix TextView::setTextColor(nullptr)'s crash
This commit is contained in:
parent
947ea9d34b
commit
cf1673f325
@ -1582,9 +1582,10 @@ void TextView::invalidateDrawable(Drawable& drawable){
|
||||
|
||||
void TextView::updateTextColors(){
|
||||
bool inval = false;
|
||||
int color;
|
||||
const std::vector<int>&drawableState = getDrawableState();
|
||||
if (mCurTextColor) {
|
||||
const int color = mTextColor->getColorForState(drawableState,0);
|
||||
color = mTextColor->getColorForState(drawableState,0);
|
||||
LOGV("%p:%d change color %x->%x",this,mID,color,mCurTextColor);
|
||||
mCurTextColor = color;
|
||||
inval = true;
|
||||
|
Loading…
Reference in New Issue
Block a user