Skip to content

Commit

Permalink
effects: Check for null vertex/pixel shaders when committing changes.
Browse files Browse the repository at this point in the history
Turns out effects can set vertex/pixel to null, so ignore these stages accordingly.
  • Loading branch information
flibitijibibo committed Nov 2, 2023
1 parent 5c5cf69 commit fef033c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mojoshader_effects.c
Original file line number Diff line number Diff line change
Expand Up @@ -1887,7 +1887,7 @@ void MOJOSHADER_effectCommitChanges(MOJOSHADER_effect *effect)
// !!! FIXME: We're just running the preshaders every time. Blech. -flibit
// !!! FIXME: Will the preshader ever want int/bool registers? -flibit
#define COPY_PARAMETER_DATA(raw, stage) \
if (raw != NULL) \
if (raw != NULL && raw->shader != NULL) \
{ \
pd = effect->ctx.getParseData(raw->shader); \
copy_parameter_data(effect->params, raw->params, \
Expand Down

0 comments on commit fef033c

Please sign in to comment.