mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-11 21:31:10 +01:00
Use ERR_FAIL_COND macro again if the image passed in is not valid in index_image. Also don't delete color information.
This commit is contained in:
parent
53aed73a64
commit
dcdb5715cc
@ -6,11 +6,8 @@ PoolColorArray ImageIndexer::get_colors() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
PoolIntArray ImageIndexer::index_image(Ref<Image> image) {
|
PoolIntArray ImageIndexer::index_image(Ref<Image> image) {
|
||||||
if(!image.is_valid()) {
|
ERR_FAIL_COND_V(!image.is_valid(), PoolIntArray());
|
||||||
return PoolIntArray();
|
|
||||||
}
|
|
||||||
|
|
||||||
_colors.resize(0);
|
|
||||||
PoolIntArray color_indices;
|
PoolIntArray color_indices;
|
||||||
|
|
||||||
image->lock();
|
image->lock();
|
||||||
|
Loading…
Reference in New Issue
Block a user