fix possible bad pointer in global vars (please test)

This commit is contained in:
Anthony Minessale 2011-02-02 16:22:43 -06:00
parent 85913b70b4
commit f60fdf653d
1 changed files with 2 additions and 0 deletions

View File

@ -131,6 +131,8 @@ void CodecWidget::setCodecString(QString codecList)
QStringList parsed = codecList.split("{");
QString var = parsed.at(1);
var = var.split("}").at(0);
// warning switch_core_get_Variable may return an unsafe pointer in some cases.
// revise to use switch_core_get_variable_dup, and then free it after you are done.
var = switch_core_get_variable(var.toAscii().data());
if ( ! var.isEmpty() ) {
codecList = var;