[patch] Calling SetText on a BTextView crash when given a bad text_run_array
|Reported by:||oco||Owned by:||axeld|
|Has a Patch:||no||Platform:||All|
The problem was discovered on a badly written application that send an unitialized text_run_array struct.
This application run ok under BeOS, but not under Haiku (page fault).
After investigation, the BTextView was not stylable. According to the BeBook, in this case, the text_run_array should be ignored. It was not the case under Haiku.
So, i propose this patch made with hints from Korli. It also fixe SetRunArray which have the same problem.