*/}}
YimingWu 3 ay önce
ebeveyn
işleme
f7bf9ce697
1 değiştirilmiş dosya ile 7 ekleme ve 5 silme
  1. 7 5
      resources/la_widgets_viewers.c

+ 7 - 5
resources/la_widgets_viewers.c

@@ -1018,11 +1018,13 @@ int OPINV_3DOr2DViewAdjust(laOperator *a, laEvent *e){
     if(a->Type->Modal == OPMOD_CanvasMove && a->This->EndInstance){
         laCanvasExtra* cex=a->This->EndInstance;
         char* str=strGetArgumentString(a->ExtraInstructionsP,"pan");
-        if(strSame(str,"left")){ cex->PanX -= (LA_RH) * cex->ZoomX; }
-        elif(strSame(str,"right")){ cex->PanX += (LA_RH) * cex->ZoomX; }
-        elif(strSame(str,"up")){ cex->PanY += (LA_RH) * cex->ZoomY; }
-        elif(strSame(str,"down")){ cex->PanY -= (LA_RH) * cex->ZoomY; }
-        return LA_FINISHED;
+        if(str){
+            if(strSame(str,"left")){ cex->PanX -= (LA_RH) * cex->ZoomX; }
+            elif(strSame(str,"right")){ cex->PanX += (LA_RH) * cex->ZoomX; }
+            elif(strSame(str,"up")){ cex->PanY += (LA_RH) * cex->ZoomY; }
+            elif(strSame(str,"down")){ cex->PanY -= (LA_RH) * cex->ZoomY; }
+            return LA_FINISHED;
+        }
     }
 
     return LA_RUNNING;