mirror of
https://github.com/minetest/minetest.git
synced 2024-08-18 20:44:16 +02:00
Client: fix failing assert on empty texture name
This commit is contained in:
parent
f596c36f4f
commit
02a893d613
@ -898,7 +898,9 @@ video::IImage* TextureSource::generateImage(std::string_view name,
|
|||||||
If this name is enclosed in parentheses, generate it
|
If this name is enclosed in parentheses, generate it
|
||||||
and blit it onto the base image
|
and blit it onto the base image
|
||||||
*/
|
*/
|
||||||
if (last_part_of_name[0] == paren_open
|
if (last_part_of_name.empty()) {
|
||||||
|
// keep baseimg == nullptr
|
||||||
|
} else if (last_part_of_name[0] == paren_open
|
||||||
&& last_part_of_name.back() == paren_close) {
|
&& last_part_of_name.back() == paren_close) {
|
||||||
auto name2 = last_part_of_name.substr(1,
|
auto name2 = last_part_of_name.substr(1,
|
||||||
last_part_of_name.size() - 2);
|
last_part_of_name.size() - 2);
|
||||||
|
Loading…
Reference in New Issue
Block a user