Terminal: NULL dereference fix

An inversion in a condition could lead to a NULL dereference.

CID 11039.
This commit is contained in:
Philippe Saint-Pierre
2012-01-02 22:30:28 -05:00
parent 4040b622f4
commit f54fc2dcfe
+1 -1
View File
@@ -615,7 +615,7 @@ TermView::_InitObject(const ShellParameters& shellParameters)
const BCharacterSet* charset
= BCharacterSetRoster::GetCharacterSetByConversionID(fEncoding);
modifiedShellParameters.SetEncoding(!charset ? charset->GetName() : "UTF-8");
modifiedShellParameters.SetEncoding(charset ? charset->GetName() : "UTF-8");
error = fShell->Open(fRows, fColumns, modifiedShellParameters);