Fix: File browser "asset" context query not ensuring file is asset
The "asset" context query would just always return the active file (if any),
without ensuring that it's actually an asset. Mistake in 3f9c943243.
This commit is contained in:
@@ -83,7 +83,7 @@ int /*eContextResult*/ file_context(const bContext *C,
|
||||
|
||||
if (CTX_data_equals(member, "asset")) {
|
||||
FileDirEntry *file = filelist_file(sfile->files, params->active_file);
|
||||
if (file == nullptr) {
|
||||
if (file == nullptr || !file->asset) {
|
||||
return CTX_RESULT_NO_DATA;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user