Missing NULL check which crashes on opening the Text Editor without an active Text object

This commit is contained in:
Dan Eicher 2012-12-29 20:16:21 +00:00
parent eae167998a
commit 76fd28c25d

@ -153,7 +153,7 @@ TextFormatType *ED_text_format_get(Text *text)
* for now this function is more of a placeholder */
/* XXX, wrong, but OK for testing */
if (BLI_testextensie(text->id.name + 2, ".osl")) {
if (text && BLI_testextensie(text->id.name + 2, ".osl")) {
return tft_lb.last;
}
else {