Fix a NULL pointer deference

Also, fixed an issue with the new conversion shader not compiling
properly on some video devices
This commit is contained in:
jp9000
2014-02-16 22:42:35 -07:00
parent f5fc9e7da8
commit 105aafbc96
2 changed files with 5 additions and 4 deletions

View File

@@ -582,8 +582,9 @@ effect_t gs_create_effect(const char *effect_string, const char *filename,
ep_init(&parser);
success = ep_parse(&parser, effect, effect_string, filename);
if (!success) {
*error_string = error_data_buildstring(
&parser.cfp.error_list);
if (error_string)
*error_string = error_data_buildstring(
&parser.cfp.error_list);
effect_destroy(effect);
effect = NULL;
}