Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EntityModelManager::renderer: catch exceptions thrown by model() #1531

Merged
merged 1 commit into from Dec 7, 2016

Conversation

ericwa
Copy link
Collaborator

@ericwa ericwa commented Dec 7, 2016

Fixes #1525
(both the crash when loading ad_quake.fgd in ad_magna.map, and the quoth flashlight example)

There is already a View::safeGetModel() function in ViewUtils but it takes a logger reference, which isn't desirable in this case:
EntityModelManager::model() already prints a warning to its logger if the model fails to load, so EntityModelManager::renderer() can just ignore and return NULL if model() throws an exception.

@kduske kduske merged commit 399226c into TrenchBroom:release/v2.0.0 Dec 7, 2016
@kduske
Copy link
Collaborator

kduske commented Dec 7, 2016

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants