mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-24 12:25:11 +00:00
filter-displacement: Do not allow zero-length file names
Fixes a crash when using c_str() on an empty string, causing an unexpected crash.
This commit is contained in:
parent
b4341e41b3
commit
bbcde070f3
1 changed files with 5 additions and 0 deletions
|
@ -160,6 +160,11 @@ void filter::displacement::displacement_instance::validate_file_texture(std::str
|
||||||
{
|
{
|
||||||
bool do_update = false;
|
bool do_update = false;
|
||||||
|
|
||||||
|
// Don't allow empty file names.
|
||||||
|
if (file.length() == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// File name different
|
// File name different
|
||||||
if (file != m_file_name) {
|
if (file != m_file_name) {
|
||||||
do_update = true;
|
do_update = true;
|
||||||
|
|
Loading…
Reference in a new issue