Qt: Fix importProfilesFromDir() semantics
The default value for skippedCnt is Q_NULLPTR. Do not dereference skippedCnt unconditionally. Change-Id: Ice33a7f9034507f39f16406cc365f39f4e543da5 Reviewed-on: https://code.wireshark.org/review/34271 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
This commit is contained in:
parent
83bdc68c96
commit
9784b1dda1
|
@ -1129,7 +1129,7 @@ int ProfileModel::importProfilesFromDir(QString dirname, int * skippedCnt, bool
|
|||
QDir profileDir(gchar_free_to_qstring(get_profiles_dir()));
|
||||
QDir dir(dirname);
|
||||
|
||||
if ( *skippedCnt)
|
||||
if ( skippedCnt )
|
||||
*skippedCnt = 0;
|
||||
|
||||
if ( dir.exists() )
|
||||
|
@ -1178,7 +1178,8 @@ int ProfileModel::importProfilesFromDir(QString dirname, int * skippedCnt, bool
|
|||
loadProfiles();
|
||||
}
|
||||
|
||||
*skippedCnt = skipped;
|
||||
if ( skippedCnt )
|
||||
*skippedCnt = skipped;
|
||||
|
||||
return count;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue