summaryrefslogtreecommitdiffstats
path: root/src/gui/WindowFactory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/WindowFactory.cpp')
-rw-r--r--src/gui/WindowFactory.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/WindowFactory.cpp b/src/gui/WindowFactory.cpp
index b06ed449..91abccaf 100644
--- a/src/gui/WindowFactory.cpp
+++ b/src/gui/WindowFactory.cpp
@@ -116,6 +116,9 @@ WindowFactory::num_open_patch_windows()
PatchWindow*
WindowFactory::patch_window(SharedPtr<PatchModel> patch)
{
+ if (!patch)
+ return NULL;
+
PatchWindowMap::iterator w = _patch_windows.find(patch->path());
return (w == _patch_windows.end()) ? NULL : w->second;