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:
Julian Eisel
2025-06-23 13:49:22 +02:00
parent c8997d821e
commit 3bc41b4175

View File

@@ -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;
}