summaryrefslogtreecommitdiffstats
path: root/Project/Workspace.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Project/Workspace.cpp')
-rw-r--r--Project/Workspace.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Project/Workspace.cpp b/Project/Workspace.cpp
index d4b6fa6..68e8464 100644
--- a/Project/Workspace.cpp
+++ b/Project/Workspace.cpp
@@ -492,8 +492,10 @@ void Workspace::OnKeyDown(wxKeyEvent& event)
// Parent's element rotating...
for(int i = 0; i < (int)element->GetParentList().size(); i++) {
Element* parent = element->GetParentList()[i];
- if(parent->IsSelected()) {
- element->RotateNode(parent);
+ if(parent) { // Check if parent is not null
+ if(parent->IsSelected()) {
+ element->RotateNode(parent);
+ }
}
}
if(element->IsSelected()) {