aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/bookmarks
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@theqtcompany.com>2015-09-16 16:38:56 +0200
committerTobias Hunger <tobias.hunger@theqtcompany.com>2015-09-16 14:45:35 +0000
commit4aa8374ddec47ab88cd8261036ea1382c107c4b3 (patch)
tree2fb09aefc253d3d5b0d5ad7ca310612215e3e78c /src/plugins/bookmarks
parent482b3959263651419bfe80b6fd102c85234f00cb (diff)
Bookmarks: Make sure we do not end up with empty filenames
... in the bookmarks. The actions should all be disabled if that is the case, but better safe than sorry (e.g. when a temporary document is not marked up as such). Change-Id: I131a870dc30258a8bca3fc57edb4692292ccb2de Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Diffstat (limited to 'src/plugins/bookmarks')
-rw-r--r--src/plugins/bookmarks/bookmarkmanager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/bookmarks/bookmarkmanager.cpp b/src/plugins/bookmarks/bookmarkmanager.cpp
index 66aecea291..d2fef2a061 100644
--- a/src/plugins/bookmarks/bookmarkmanager.cpp
+++ b/src/plugins/bookmarks/bookmarkmanager.cpp
@@ -438,7 +438,7 @@ QMimeData *BookmarkManager::mimeData(const QModelIndexList &indexes) const
void BookmarkManager::toggleBookmark(const QString &fileName, int lineNumber)
{
- if (lineNumber <= 0)
+ if (lineNumber <= 0 || fileName.isEmpty())
return;
// Remove any existing bookmark on this line