diff --git a/modules/gui/qt/medialibrary/mlbasemodel.cpp b/modules/gui/qt/medialibrary/mlbasemodel.cpp
index 3a9b2871a46e8d7d80418141c9c9b28622c15c8d..db187f10de9a11ea157468a4e2a25b5e59983d90 100644
--- a/modules/gui/qt/medialibrary/mlbasemodel.cpp
+++ b/modules/gui/qt/medialibrary/mlbasemodel.cpp
@@ -229,7 +229,7 @@ void MLBaseModel::onVlcMlEvent(const MLEvent &event)
                     QString mrl;
                     if (event.media_thumbnail_generated.b_success)
                     {
-                        QString thumbnail = qfu(event.media_thumbnail_generated.psz_mrl);
+                        mrl = qfu(event.media_thumbnail_generated.psz_mrl);
                         status = event.media_thumbnail_generated.i_status;
                     }
                     thumbnailUpdated(index(row), item, mrl, status);