text-freetype2: Don't create vertex buffer if text is empty

上级 672d0b37
......@@ -99,6 +99,12 @@ void set_up_vertex_buffer(struct ft2_source *srcdata)
srcdata->vbuf = NULL;
gs_vertexbuffer_destroy(tmpvbuf);
}
if (*srcdata->text == 0) {
obs_leave_graphics();
return;
}
srcdata->vbuf = create_uv_vbuffer((uint32_t)wcslen(srcdata->text) * 6,
true);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册