Set a minimum of 1x1 for Android text bitmap measurement.

Should fix some crashes seen on Google Play
This commit is contained in:
Henrik Rydgård committed 2018-08-30 19:49:33 +02:00
1 parent 773dba1be2
commit 8e6a1bc849
2 files changed
+7 -6

No files matched your search

+1 -2
View File
@@ -1078,12 +1078,11 @@ InputLayout *VKContext::CreateInputLayout(const InputLayoutDesc &desc) {
}
Texture *VKContext::CreateTexture(const TextureDesc &desc) {
if (!push_) {
if (!push_ || !renderManager_.GetInitCmd()) {
// Too early! Fail.
ELOG("Can't create textures before the first frame has started.");
return nullptr;
}
_assert_(renderManager_.GetInitCmd());
return new VKTexture(vulkan_, renderManager_.GetInitCmd(), push_, desc, allocator_);
}