Terminal: NULL dereference fix
An inversion in a condition could lead to a NULL dereference. CID 11039.
This commit is contained in:
@@ -615,7 +615,7 @@ TermView::_InitObject(const ShellParameters& shellParameters)
|
|||||||
|
|
||||||
const BCharacterSet* charset
|
const BCharacterSet* charset
|
||||||
= BCharacterSetRoster::GetCharacterSetByConversionID(fEncoding);
|
= BCharacterSetRoster::GetCharacterSetByConversionID(fEncoding);
|
||||||
modifiedShellParameters.SetEncoding(!charset ? charset->GetName() : "UTF-8");
|
modifiedShellParameters.SetEncoding(charset ? charset->GetName() : "UTF-8");
|
||||||
|
|
||||||
error = fShell->Open(fRows, fColumns, modifiedShellParameters);
|
error = fShell->Open(fRows, fColumns, modifiedShellParameters);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user