diff --git a/lib/libimhex/source/api/imhex_api.cpp b/lib/libimhex/source/api/imhex_api.cpp index 4d48152c2..2233c14d8 100644 --- a/lib/libimhex/source/api/imhex_api.cpp +++ b/lib/libimhex/source/api/imhex_api.cpp @@ -337,8 +337,11 @@ namespace hex { } void markDirty() { - get()->markDirty(); - EventProviderDirtied::post(get()); + const auto provider = get(); + if (!provider->isDirty()) { + provider->markDirty(); + EventProviderDirtied::post(provider); + } } void resetDirty() {