Skip to content

Commit 04fc898

Browse files
ShaderMacroHelper: handle null macro definitions
1 parent d694139 commit 04fc898

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Graphics/GraphicsTools/interface/ShaderMacroHelper.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019-2023 Diligent Graphics LLC
2+
* Copyright 2019-2024 Diligent Graphics LLC
33
* Copyright 2015-2019 Egor Yusov
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -197,7 +197,7 @@ class ShaderMacroHelper
197197
template <>
198198
inline ShaderMacroHelper& ShaderMacroHelper::AddShaderMacro(const Char* Name, const Char* Definition)
199199
{
200-
return Add(ShaderMacro{Name, Definition});
200+
return Add(ShaderMacro{Name, Definition != nullptr ? Definition : ""});
201201
}
202202

203203
template <>

0 commit comments

Comments
 (0)