Fix crash when clicking the sort button in the style manager with no styles selected
Originally committed to SVN as r6628.
This commit is contained in:
parent
a76fb7c432
commit
31a0146df2
1 changed files with 5 additions and 2 deletions
|
@ -765,8 +765,11 @@ void DialogStyleManager::MoveStyles(bool storage, int type) {
|
|||
int n = list->GetSelections(sels);
|
||||
if (n == 0 && type != 4) return;
|
||||
|
||||
int first = sels.front();
|
||||
int last = sels.back();
|
||||
int first = 0, last = 0;
|
||||
if (n) {
|
||||
first = sels.front();
|
||||
last = sels.back();
|
||||
}
|
||||
|
||||
if (storage) {
|
||||
do_move(Store, type, first, last, true);
|
||||
|
|
Loading…
Reference in a new issue