mirror of https://github.com/odrling/Aegisub
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
|
@ -765,8 +765,11 @@ void DialogStyleManager::MoveStyles(bool storage, int type) {
|
||||||
int n = list->GetSelections(sels);
|
int n = list->GetSelections(sels);
|
||||||
if (n == 0 && type != 4) return;
|
if (n == 0 && type != 4) return;
|
||||||
|
|
||||||
int first = sels.front();
|
int first = 0, last = 0;
|
||||||
int last = sels.back();
|
if (n) {
|
||||||
|
first = sels.front();
|
||||||
|
last = sels.back();
|
||||||
|
}
|
||||||
|
|
||||||
if (storage) {
|
if (storage) {
|
||||||
do_move(Store, type, first, last, true);
|
do_move(Store, type, first, last, true);
|
||||||
|
|
Loading…
Reference in New Issue