StrataSource / vtex2

A VTF converter and editor
MIT License
44 stars 8 forks source link

Reformatted code and wip file importing #10

Closed darvil82 closed 2 years ago

darvil82 commented 2 years ago
darvil82 commented 2 years ago

Currently crashing when importing a file if no file was opened before. Investigating.

darvil82 commented 2 years ago

Found crash point:

// Select the correct image format
for (int i = 0; i < util::ArraySize(IMAGE_FORMATS); ++i) {
    if (IMAGE_FORMATS[i].format == file->GetFormat()) {
        // FIXME: IT CRASHES HERE
        formatCombo_->setCurrentIndex(i);
        break;
    }
}

At line 520, the program segfaults. Note that this only happens if the first thing done by the user is import the file.

darvil82 commented 2 years ago

Definitely, next time I'll use rebase. Thank you very much <3